Replication is being checked locally, so apply to localhost
authorAlex Dehnert <alex@dehnerts.com>
Tue, 12 Sep 2023 18:24:00 +0000 (18:24 +0000)
committerAlex Dehnert <alex@dehnerts.com>
Tue, 12 Sep 2023 18:24:00 +0000 (18:24 +0000)
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.

local.d/localhost.cfg [new file with mode: 0644]
local.d/olinda.cfg

diff --git a/local.d/localhost.cfg b/local.d/localhost.cfg
new file mode 100644 (file)
index 0000000..060d9ad
--- /dev/null
@@ -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
+}
index 78f1d3ab2a3e9b53d16e5643091ad45c7533db2d..3eed9c2afb5a5b63326353d69118ecb110bda84a 100644 (file)
@@ -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