Volans has uploaded a new change for review.
https://gerrit.wikimedia.org/r/316806
Change subject: Icinga: disable event_handler on passive hosts
......................................................................
Icinga: disable event_handler on passive hosts
* Improve timeout detection for raid_handler
Bug: T142085
Change-Id: I8bbc61ed17fb61d7f5079ab708a96c03a44f81f7
---
M hieradata/hosts/einsteinium.yaml
M hieradata/hosts/tegmen.yaml
M modules/icinga/files/raid_handler.py
M modules/icinga/manifests/init.pp
M modules/icinga/templates/icinga.cfg.erb
5 files changed, 8 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/06/316806/1
diff --git a/hieradata/hosts/einsteinium.yaml b/hieradata/hosts/einsteinium.yaml
index 8e07a84..d3d3c72 100644
--- a/hieradata/hosts/einsteinium.yaml
+++ b/hieradata/hosts/einsteinium.yaml
@@ -1 +1,2 @@
icinga::enable_notifications: 0
+icinga::enable_event_handlers: 0
diff --git a/hieradata/hosts/tegmen.yaml b/hieradata/hosts/tegmen.yaml
index 8e07a84..d3d3c72 100644
--- a/hieradata/hosts/tegmen.yaml
+++ b/hieradata/hosts/tegmen.yaml
@@ -1 +1,2 @@
icinga::enable_notifications: 0
+icinga::enable_event_handlers: 0
diff --git a/modules/icinga/files/raid_handler.py
b/modules/icinga/files/raid_handler.py
index 31e9722..ed91a7f 100644
--- a/modules/icinga/files/raid_handler.py
+++ b/modules/icinga/files/raid_handler.py
@@ -213,7 +213,7 @@
logger.debug('Nothing to do, exiting')
return
- if 'Timeout' in args.message:
+ if 'timeout' in args.message.lower():
logger.info(
("Skipping RAID Handler execution for host '{}' and "
"RAID type '{}', timeout detected: {}").format(
diff --git a/modules/icinga/manifests/init.pp b/modules/icinga/manifests/init.pp
index 5ec109d..2c14dc3 100644
--- a/modules/icinga/manifests/init.pp
+++ b/modules/icinga/manifests/init.pp
@@ -4,7 +4,10 @@
# FIXME: A lot of code in here (init script, user setup, logrotate,
# and others) should probably come from the icinga deb package,
# and not from puppet. Investigate and potentially fix this.
-class icinga($enable_notifications=1) {
+class icinga(
+ $enable_notifications=1,
+ $enable_event_handlers=1,
+) {
# Setup icinga user
# FIXME: This should be done by the package
include icinga::group
diff --git a/modules/icinga/templates/icinga.cfg.erb
b/modules/icinga/templates/icinga.cfg.erb
index dff6a84..d068355 100644
--- a/modules/icinga/templates/icinga.cfg.erb
+++ b/modules/icinga/templates/icinga.cfg.erb
@@ -858,7 +858,7 @@
# you're implementing redundant hosts, leave this option enabled.
# Values: 1 = enable event handlers, 0 = disable event handlers
-enable_event_handlers=1
+enable_event_handlers=<%= @enable_event_handlers %>
--
To view, visit https://gerrit.wikimedia.org/r/316806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bbc61ed17fb61d7f5079ab708a96c03a44f81f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Volans <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits