Dzahn has submitted this change and it was merged.

Change subject: fix mailman queue monitoring
......................................................................


fix mailman queue monitoring

follow-up to Change-Id: Ife9e2e4544b3495

currently doesn't work, status UNKNOWN

- this needs to be an NRPE check, not a regular one
- usually with the new method to setup NRPE checks,
  we just define the checkcommands and are done,
  because they use stuff from the nagios-plugins package
- but in this case it's a custom plugin, so that needs
  to be installed somehow as well (on sodium! not on neon)

https://icinga.wikimedia.org/cgi-bin/icinga/extinfo.cgi?type=2&host=sodium&service=mailman_queue_size

Change-Id: If03d81ce1b0b7675f8a428cb328d3aee9b43d4c8
---
M manifests/role/mail.pp
M templates/icinga/checkcommands.cfg.erb
2 files changed, 10 insertions(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/manifests/role/mail.pp b/manifests/role/mail.pp
index 61dea96..87815b6 100644
--- a/manifests/role/mail.pp
+++ b/manifests/role/mail.pp
@@ -159,9 +159,17 @@
         check_command => 
'check_https_url_for_string!lists.wikimedia.org!/pipermail/wikimedia-l/!\'The 
Wikimedia-l Archives\'',
     }
 
-    monitor_service { 'mailman_queue':
+    file { '/usr/lib/nagios/plugins/mailman_queue_size':
+        ensure => present,
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0755',
+        source => 'puppet:///files/icinga/check_mailman_qeue',
+    }
+
+    nrpe::monitor_service { 'mailman_queue':
         description   => 'mailman_queue_size',
-        check_command => 'check_mailman_queue!42',
+        nrpe_command  => '/usr/lib/nagios/plugins/check_mailman_queue 42',
     }
 
 }
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 0798174..74b2b42 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -364,11 +364,6 @@
     command_line    /usr/lib/nagios/plugins/check_eventlogging_jobs
 }
 
-define command{
-    command_name    check_mailman_queue
-    command_line    $USER1$/check_mailman_queue $ARG1$
-}
-
 #Generic NRPE check
 # ARG1: command to execute on remote host
 # ARG2: timeout in seconds

-- 
To view, visit https://gerrit.wikimedia.org/r/155620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If03d81ce1b0b7675f8a428cb328d3aee9b43d4c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to