Dzahn has submitted this change and it was merged.
Change subject: ores: monitor workers without service reloads
......................................................................
ores: monitor workers without service reloads
This way we will avoid reloading the Icinga config
each puppet run and still monitor ORES workers the
right way. This will also return a 200 and not just a 301.
Bug:T122830
Change-Id: I88ce6a4292b9e2c07106f97b52fb0b945e54c3ff
---
M modules/icinga/manifests/monitor/ores.pp
A modules/nagios_common/files/check_commands/check_ores_workers
A modules/nagios_common/files/check_commands/check_ores_workers.cfg
3 files changed, 22 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/modules/icinga/manifests/monitor/ores.pp
b/modules/icinga/manifests/monitor/ores.pp
index 2ee74ff..8e21a53 100644
--- a/modules/icinga/manifests/monitor/ores.pp
+++ b/modules/icinga/manifests/monitor/ores.pp
@@ -13,12 +13,19 @@
}
# T121656
- $timestamp = generate('/bin/date', '+%s')
monitoring::service { 'ores_worker':
description => 'ORES worker',
- check_command =>
"check_http_url!ores.wmflabs.org!/scores/testwiki/reverted/${timestamp}/",
+ check_command => 'check_ores_workers',
host => 'ores.wmflabs.org',
contact_group => 'team-ores',
}
+ # T122830
+ file { '/usr/local/lib/nagios/plugins/check_ores_workers':
+ source =>
'puppet:///modules/nagios_common/check_commands/check_ores_workers',
+ owner => 'icinga',
+ group => 'icinga',
+ mode => '0550',
+ }
+
}
diff --git a/modules/nagios_common/files/check_commands/check_ores_workers
b/modules/nagios_common/files/check_commands/check_ores_workers
new file mode 100755
index 0000000..fed0d80
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_ores_workers
@@ -0,0 +1,9 @@
+#!/bin/bash
+# monitor ORES (T121656, T122830)
+
+timestamp=$(/bin/date +%s)
+pluginpath="/usr/lib/nagios/plugins"
+host=$1
+
+$pluginpath/check_http -H $host -I $host -u
"http://oresweb/scores/testwiki/reverted/${timestamp}/"
+
diff --git a/modules/nagios_common/files/check_commands/check_ores_workers.cfg
b/modules/nagios_common/files/check_commands/check_ores_workers.cfg
new file mode 100644
index 0000000..48b6bef
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_ores_workers.cfg
@@ -0,0 +1,4 @@
+define command {
+ command_name check_ores_workers
+ command_line $USER4$/check_ores_workers $HOSTADDRESS$
+}
--
To view, visit https://gerrit.wikimedia.org/r/262418
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I88ce6a4292b9e2c07106f97b52fb0b945e54c3ff
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits