Alexandros Kosiaris has uploaded a new change for review.
https://gerrit.wikimedia.org/r/322627
Change subject: Move the check_systemd_state check to base
......................................................................
Move the check_systemd_state check to base
Having the file in the same module as where it is actually referenced
from is a better design pattern and causes less confusion
Change-Id: I85ccd764af43825d69734e492f8fb2b000a2d176
---
R modules/base/files/check_systemd_state.py
M modules/base/manifests/monitoring/host.pp
M modules/nrpe/manifests/systemd_scripts.pp
3 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/27/322627/1
diff --git a/modules/nrpe/files/plugins/check_systemd_state.py
b/modules/base/files/check_systemd_state.py
similarity index 100%
rename from modules/nrpe/files/plugins/check_systemd_state.py
rename to modules/base/files/check_systemd_state.py
diff --git a/modules/base/manifests/monitoring/host.pp
b/modules/base/manifests/monitoring/host.pp
index 20f6016..4f535e5 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -124,6 +124,13 @@
nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 1: -c 1:4
--ereg-argument-array '^/usr/bin/python /usr/bin/salt-minion'",
}
if $::initsystem == 'systemd' {
+ file { '/usr/local/lib/nagios/plugins/check_systemd_state':
+ ensure => present,
+ source => 'puppet:///modules/base/check_systemd_state.py',
+ owner => 'root',
+ group => 'root',
+ mode => '0555',
+ }
nrpe::monitor_service { 'check_systemd_state':
description => 'Check systemd state',
nrpe_command =>
'/usr/local/lib/nagios/plugins/check_systemd_state',
diff --git a/modules/nrpe/manifests/systemd_scripts.pp
b/modules/nrpe/manifests/systemd_scripts.pp
index 4e132e6..586a9df 100644
--- a/modules/nrpe/manifests/systemd_scripts.pp
+++ b/modules/nrpe/manifests/systemd_scripts.pp
@@ -15,11 +15,4 @@
group => 'root',
mode => '0555',
}
- file { '/usr/local/lib/nagios/plugins/check_systemd_state':
- ensure => present,
- source => 'puppet:///modules/nrpe/plugins/check_systemd_state.py',
- owner => 'root',
- group => 'root',
- mode => '0555',
- }
}
--
To view, visit https://gerrit.wikimedia.org/r/322627
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85ccd764af43825d69734e492f8fb2b000a2d176
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits