Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Have check_sysctl populated on all hosts
......................................................................


Have check_sysctl populated on all hosts

It was populated wrongly in 5f07e69 on the icinga host(s) but this needs to
be executed via NRPE on the actual host being monitored. Moving it to
the base module and have it populated on all hosts

Change-Id: I8777d94d846e0c70a3f532bd80c9be921ad82b86
---
M manifests/misc/icinga.pp
R modules/base/files/check_sysctl
M modules/base/manifests/monitoring/host.pp
M templates/icinga/checkcommands.cfg.erb
4 files changed, 7 insertions(+), 13 deletions(-)

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



diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 7368b09..eb1f4f9 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -617,13 +617,6 @@
         group  => 'root',
         mode   => '0755',
     }
-    file { '/usr/lib/nagios/plugins/check_sysctl':
-        source => 'puppet:///files/icinga/check_sysctl',
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0755',
-    }
-
     # Include check_elasticsearch from elasticsearch module
     include elasticsearch::nagios::plugin
 
diff --git a/files/icinga/check_sysctl b/modules/base/files/check_sysctl
similarity index 100%
rename from files/icinga/check_sysctl
rename to modules/base/files/check_sysctl
diff --git a/modules/base/manifests/monitoring/host.pp 
b/modules/base/manifests/monitoring/host.pp
index d9b69bf..e7ad57a 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -60,6 +60,13 @@
         mode    => '0555',
         content => template('base/check_eth.erb'),
     }
+    file { '/usr/lib/nagios/plugins/check_sysctl':
+        ensure => present,
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0555',
+        source => 'puppet:///modules/check_sysctl',
+    }
 
     sudo_user { 'nagios':
         privileges   => ['ALL = NOPASSWD: /usr/local/bin/check-raid.py'],
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 6ca2196..ea9babc 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -514,12 +514,6 @@
        command_line    $USER1$/check_graphite -U $ARG1$ --from $ARG2$  -t 
reqstats.5xx -W $ARG3$ -C $ARG4$
 }
 
-define command{
-        command_name   check_sysctl
-        command_line   $USER1$/check_sysctl $ARG1$
-}
-
-
 # Checks whether a host belongs to given dsh group(s)
 define command{
        command_name    check_dsh_groups

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8777d94d846e0c70a3f532bd80c9be921ad82b86
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