Home / Archive for Albert / Page 3

Author: Albert

How to create custom email template in Alertmanager?

Configure your email receiver to, for example, display the email's subject in the headers section and its template-based body of text. receivers: - name: EmailReceiver - to: myaddress@example.com headers: subject: 'Summary: {{ .CommonLabels.alertname }} {{ if eq .Status "firing" }}(Firing){{ else }}(Resolved){{ end }}' html: '{{ template "emailcontent.txt" . }}' As indicated below, add the …

Read more

How to calculate memory assigned for nodes in a cluster

Run the following command to calculate the currently used memory (megabytes) in openshift container platform 4.x. oc adm top node | awk '{ sum+=$4} END {print sum}' Run the following command to calculate the used memory (megabytes) for worker nodes in the cluster. oc adm top node --selector='node-role.kubernetes.io/worker=' | awk '{ sum+=$4} END {print sum}' …

Read more

How do change the location of /var/log/squid/squid.out file?

To change the location of squid.out file, copy /usr/libexec/squid/cache_swap.sh to a new location. # cp /usr/libexec/squid/cache_swap.sh /usr/libexec/squid/cust_cache_swap.sh Open with vi and edit the following section in the new file cust_cache_swap.sh. squid -N -z -F -f $SQUID_CONF >> /new/path/to/squid.out 2>&1 Copy the unit file of squid.service as follows. # cp /usr/lib/systemd/system/squid.service /etc/systemd/system/ Edit /etc/systemd/system/squid.service. (before) ExecStartPre=/usr/libexec/squid/cache_swap.sh …

Read more

Why packets drops against ‘rx_fifo_errors’ parameter in the output of ‘ethtool -S ‘ ?

The output of ethtool -S <interface> reveals receive fifo errors. Additionally, rx_queue_<n>_drops, the total of which equals the value of rx_fifo_errors, are reported. # ethtool -S eth0 | egrep 'rx_fifo|drops' rx_fifo_errors: 120674 rx_queue_0_drops: 4032 rx_queue_1_drops: 3036 rx_queue_2_drops: 5904 rx_queue_3_drops: 0 rx_queue_4_drops: 228 rx_queue_5_drops: 65656 rx_queue_6_drops: 19267 rx_queue_7_drops: 22551 # ethtool -S eth0 | egrep drops …

Read more

Why Ansible Engine / Tower job fail with ‘Server not found in Kerberos database’ Error ?

My playbook job fails with the error “Server not found in Kerberos database” when executed against a Windows server with Kerberos authentication. TASK [Ping host] ****************************************************************************************************************************************************************************************** fatal: [host01.mydomain.com]: UNREACHABLE! => {"changed": false, "msg": "kerberos: authGSSClientStep() failed: (('Unspecified GSS failure. Minor code may provide more information', 851968), ('Server not found in Kerberos database', -1765328377))", "unreachable": true} …

Read more