Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/348171 )
Change subject: contint/icinga: make jenkins service monitoring configurable
......................................................................
contint/icinga: make jenkins service monitoring configurable
Make jenkins service Icinga monitoring configurable in Hiera,
next to existing "ensure" variables, so it can easily be skipped
on contint2001 until jenkins will become active/active and run
on both servers. We want to avoid the alerts in Icinga until then.
Bug: T162822
Bug: T150771
Change-Id: I4dd3b239edcca691699fc22f57b25c281f872376
---
M hieradata/hosts/contint1001.yaml
M hieradata/hosts/contint2001.yaml
M modules/jenkins/manifests/init.pp
3 files changed, 8 insertions(+), 5 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/hieradata/hosts/contint1001.yaml b/hieradata/hosts/contint1001.yaml
index 7c84be2..c59a936 100644
--- a/hieradata/hosts/contint1001.yaml
+++ b/hieradata/hosts/contint1001.yaml
@@ -1,5 +1,6 @@
# hotspare is contint2001
jenkins::service_ensure: unmanaged
jenkins::service_enable: false
+jenkins::service_monitor: true
zuul::server::service_ensure: running
zuul::server::service_enable: true
diff --git a/hieradata/hosts/contint2001.yaml b/hieradata/hosts/contint2001.yaml
index 932846c..5fa910e 100644
--- a/hieradata/hosts/contint2001.yaml
+++ b/hieradata/hosts/contint2001.yaml
@@ -1,5 +1,6 @@
# master is contint1001
jenkins::service_ensure: unmanaged
jenkins::service_enable: false
+jenkins::service_monitor: false
zuul::server::service_ensure: stopped
zuul::server::service_enable: false
diff --git a/modules/jenkins/manifests/init.pp
b/modules/jenkins/manifests/init.pp
index 5c8599b..e7e5a72 100644
--- a/modules/jenkins/manifests/init.pp
+++ b/modules/jenkins/manifests/init.pp
@@ -167,11 +167,12 @@
],
}
- # nagios monitoring
- nrpe::monitor_service { 'jenkins':
- description => 'jenkins_service_running',
- contact_group => 'contint',
- nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1
--ereg-argument-array '^/usr/bin/java .*-jar /usr/share/jenkins/jenkins.war'",
+ if hiera('jenkins::service_monitor', true) {
+ nrpe::monitor_service { 'jenkins':
+ description => 'jenkins_service_running',
+ contact_group => 'contint',
+ nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 1:1 -c
1:1 --ereg-argument-array '^/usr/bin/java .*-jar
/usr/share/jenkins/jenkins.war'",
+ }
}
file { '/var/lib/jenkins':
--
To view, visit https://gerrit.wikimedia.org/r/348171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4dd3b239edcca691699fc22f57b25c281f872376
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits