Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Migrate ircecho module's nrpe checks to nrpe module
......................................................................


Migrate ircecho module's nrpe checks to nrpe module

Use the new nrpe::monitor_service definition to clear up the nrpe
process check. While at it also scope the template variables for
ircecho module's default.erb

Change-Id: I111d2e98571de271ee0a31638602578fc7662073
---
M manifests/role/echoirc.pp
M modules/ircecho/templates/default.erb
M modules/nrpe/templates/nrpe_local.cfg.erb
M templates/icinga/checkcommands.cfg.erb
4 files changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp
index 67dfc1e..535eb93 100644
--- a/manifests/role/echoirc.pp
+++ b/manifests/role/echoirc.pp
@@ -4,6 +4,9 @@
     system::role { 'ircecho': description => 'ircecho server' }
 
     # bug 26784 - IRC bots process need nagios monitoring
-    monitor_service { "ircecho": description => "ircecho_service_running", 
check_command => "nrpe_check_ircecho" }
+    nrpe::monitor_service { 'ircecho':
+        description  => 'ircecho_service_running',
+        nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a 
ircecho',
+    }
 }
 
diff --git a/modules/ircecho/templates/default.erb 
b/modules/ircecho/templates/default.erb
index aca00ec..4e933da 100644
--- a/modules/ircecho/templates/default.erb
+++ b/modules/ircecho/templates/default.erb
@@ -49,7 +49,7 @@
 #
 # This is a POSIX shell fragment
 #
-INFILE="<%= infile(ircecho_logs) %>"
-NICK="<%= ircecho_nick %>"
-CHANS="<%= chans(ircecho_logs) %>"
-SERVER="<%= ircecho_server %>"
+INFILE="<%= infile(@ircecho_logs) %>"
+NICK="<%= @ircecho_nick %>"
+CHANS="<%= chans(@ircecho_logs) %>"
+SERVER="<%= @ircecho_server %>"
diff --git a/modules/nrpe/templates/nrpe_local.cfg.erb 
b/modules/nrpe/templates/nrpe_local.cfg.erb
index f56f635..3f54f7d 100644
--- a/modules/nrpe/templates/nrpe_local.cfg.erb
+++ b/modules/nrpe/templates/nrpe_local.cfg.erb
@@ -13,7 +13,6 @@
 command[check_ram]=/usr/lib/nagios/plugins/check_ram.sh 20 5 b
 
 # process checks, we can't make this generic because we don't pass args via 
nrpe (security)
-command[check_ircecho]=/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a 
ircecho
 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'
 command[check_zuul]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--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
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index cee7c2e..00a2d57 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -552,11 +552,6 @@
 }
 
 # end percona mysql checks
-define command{
-        command_name    nrpe_check_ircecho
-        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_ircecho
-}
-
 # dummy check that's useful to check that paging is working
 define command{
         command_name    check_to_check_nagios_paging

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I111d2e98571de271ee0a31638602578fc7662073
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to