Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/106267
Change subject: zuul: switch to nrpe::monitor_service
......................................................................
zuul: switch to nrpe::monitor_service
monitor_service for nrpe require us to also defines commands in nrpe
configuration and in icinga checkcommands. The new
nrpe::monitor_service let us do everything at one place, much easier.
Change-Id: I9eaa35988fd1c15bcd656de2d4670c3a029b6a7b
---
M manifests/zuul.pp
M modules/nrpe/templates/nrpe_local.cfg.erb
M templates/icinga/checkcommands.cfg.erb
3 files changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/67/106267/1
diff --git a/manifests/zuul.pp b/manifests/zuul.pp
index b0e0995..63e9ab0 100644
--- a/manifests/zuul.pp
+++ b/manifests/zuul.pp
@@ -45,7 +45,12 @@
}
# nagios/icinga monitoring
- monitor_service { 'zuul': description =>
'zuul_service_running', check_command => 'nrpe_check_zuul' }
+ nrpe::monitor_service { 'zuul':
+ description => 'zuul_service_running',
+ # Zuul has a main process and a fork which is
the gearman
+ # server. Thus we need two process running.
+ nrpe_command =>
"/usr/lib/nagios/plugins/check_procs -w 2:2 -c 2:2 --ereg-argument-array
'^/usr/bin/python /usr/local/bin/zuul-server'",
+ }
nrpe::monitor_service { 'zuul_gearman':
description => 'zuul_gearman_service',
nrpe_command =>
'/usr/lib/nagios/plugins/check_tcp -H 127.0.0.1 -p 4730 --timeout=2',
diff --git a/modules/nrpe/templates/nrpe_local.cfg.erb
b/modules/nrpe/templates/nrpe_local.cfg.erb
index 2070766..a0fd494 100644
--- a/modules/nrpe/templates/nrpe_local.cfg.erb
+++ b/modules/nrpe/templates/nrpe_local.cfg.erb
@@ -14,9 +14,6 @@
# process checks, we can't make this generic because we don't pass args via
nrpe (security)
command[check_jenkins]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1
--ereg-argument-array '^/usr/bin/java .*-jar /usr/share/jenkins/jenkins.war'
-# Zuul has a main process and a fork which is the gearman server. Thus we need
-# two process running.
-command[check_zuul]=/usr/lib/nagios/plugins/check_procs -w 2:2 -c 2:2
--ereg-argument-array '^/usr/bin/python /usr/local/bin/zuul-server'
command[check_mailman]=/usr/lib/nagios/plugins/check_procs -w 1:25 -c 1:35 -a
mailman
command[check_spamd]=/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1:40 -a
spamd
command[check_poolcounterd]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:3
-C poolcounterd
diff --git a/templates/icinga/checkcommands.cfg.erb
b/templates/icinga/checkcommands.cfg.erb
index 00a2d57..9fe2110 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -365,10 +365,6 @@
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c
check_jenkins
}
define command{
- command_name nrpe_check_zuul
- command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c
check_zuul
-}
-define command{
command_name nrpe_check_mailman
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c
check_mailman
}
--
To view, visit https://gerrit.wikimedia.org/r/106267
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9eaa35988fd1c15bcd656de2d4670c3a029b6a7b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits