From: Alex Dehnert Date: Tue, 12 Sep 2023 18:24:00 +0000 (+0000) Subject: Replication is being checked locally, so apply to localhost X-Git-Url: https://dehnerts.com/gitweb/?a=commitdiff_plain;h=c7ab9266d357e0e89d1bed9b84c3c13a289aa29e;p=sysconfig%2Fnagios3.git Replication is being checked locally, so apply to localhost Otherwise standing up a monitoring service on chankillo led to misleading outage messages claiming that olinda was broken. Citing "localhost" leaves you to figure out which host it is, but at least it's obviously unclear. --- diff --git a/local.d/localhost.cfg b/local.d/localhost.cfg new file mode 100644 index 0000000..060d9ad --- /dev/null +++ b/local.d/localhost.cfg @@ -0,0 +1,23 @@ +define command{ + command_name check_dovecot_replicator + #command_line /var/lib/nagios/check_doveadm_replication/check_doveadm_replication.sh --sudo=dovecot -{w,c}"Waiting_Failed_Requests=2:1,/^Queued_.*_Requests$/=:1" + command_line /etc/scripts/check_doveadm_replication/check_doveadm_replication.sh --sudo=dovecot -w"Waiting_Failed_Requests=:1,/^Queued_.*_Requests$/=:1" -c"Waiting_Failed_Requests=:1,/^Queued_.*_Requests$/=:1" + #command_line /var/lib/nagios/check_doveadm_replication/check_doveadm_replication.sh --sudo=dovecot -w "Waiting_Failed_Requests=2:1" -c "Waiting_Failed_Requests=2:1" + +} + +define service { + name localhost-dovecot-replicator + use adehnert-service + service_description DOVECOT-REPLICATOR + check_command check_dovecot_replicator + host_name localhost +} + +define service { + name localhost-postfix-queue + use adehnert-service + service_description POSTFIX-QUEUE + check_command check_mailq_postfix!50!250 + host_name localhost +} diff --git a/local.d/olinda.cfg b/local.d/olinda.cfg index 78f1d3a..3eed9c2 100644 --- a/local.d/olinda.cfg +++ b/local.d/olinda.cfg @@ -38,30 +38,6 @@ define service { host_name olinda } -define command{ - command_name check_dovecot_replicator - #command_line /var/lib/nagios/check_doveadm_replication/check_doveadm_replication.sh --sudo=dovecot -{w,c}"Waiting_Failed_Requests=2:1,/^Queued_.*_Requests$/=:1" - command_line /var/lib/nagios/check_doveadm_replication/check_doveadm_replication.sh --sudo=dovecot -w"Waiting_Failed_Requests=:1,/^Queued_.*_Requests$/=:1" -c"Waiting_Failed_Requests=:1,/^Queued_.*_Requests$/=:1" - #command_line /var/lib/nagios/check_doveadm_replication/check_doveadm_replication.sh --sudo=dovecot -w "Waiting_Failed_Requests=2:1" -c "Waiting_Failed_Requests=2:1" - -} - -define service { - name olinda-dovecot-replicator - use adehnert-service - service_description DOVECOT-REPLICATOR - check_command check_dovecot_replicator - host_name olinda -} - -define service { - name olinda-postfix-queue - use adehnert-service - service_description POSTFIX-QUEUE - check_command check_mailq_postfix!50!250 - host_name olinda -} - define service { name olinda-dns use adehnert-service