Dzahn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/259319
Change subject: icinga: add logic to avoid paging for test machines
......................................................................
icinga: add logic to avoid paging for test machines
Add logic to icinga to only send SMS to us if the
service is set to "critical" AND it's also not a test machine.
Machines that are for testing would be marked in hiera with
"is_test_machine: true" to disable all paging at once per machine or role.
This is in response to the comment by Andrew on Ic4bec99c5ea1d3e0
to try and find a global solution for this issue.
Change-Id: I63b5a42c4d1ddd723e994330645bf1894036db9c
---
M modules/monitoring/manifests/service.pp
1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/19/259319/1
diff --git a/modules/monitoring/manifests/service.pp
b/modules/monitoring/manifests/service.pp
index 5ecd80d..f059496 100644
--- a/modules/monitoring/manifests/service.pp
+++ b/modules/monitoring/manifests/service.pp
@@ -32,9 +32,19 @@
default => 0,
}
- $contact_critical = $critical ? {
- true => "${contact_group},sms,admins",
- default => $contact_group,
+ # If a service is set to critical AND it's NOT a test machine,
+ # then use the "sms" contact group which creates SMS/pages.
+ case $critical {
+ true: {
+ case $::is_test_machine {
+ true: {
+ $contact_critical = $contact_group,
+ }
+ default: {
+ $contact_critical = "${contact_group},sms,admins",
+ }
+ default: {
+ $contact_critical = $contact_group,
}
$is_active = $passive ? {
--
To view, visit https://gerrit.wikimedia.org/r/259319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63b5a42c4d1ddd723e994330645bf1894036db9c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits