Giuseppe Lavagetto has uploaded a new change for review.
https://gerrit.wikimedia.org/r/314537
Change subject: role::icinga: declare common resources only on the primary
server
......................................................................
role::icinga: declare common resources only on the primary server
Change-Id: Ie238d87f472b3a71fd759652078b7b3d1914c020
---
M hieradata/role/common/icinga.yaml
M manifests/role/icinga.pp
2 files changed, 25 insertions(+), 25 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/37/314537/1
diff --git a/hieradata/role/common/icinga.yaml
b/hieradata/role/common/icinga.yaml
index fe8a590..1fc73af 100644
--- a/hieradata/role/common/icinga.yaml
+++ b/hieradata/role/common/icinga.yaml
@@ -1,3 +1,4 @@
debdeploy::grains:
debdeploy-icinga:
value: standard
+role::icinga::primary: neon.wikimedia.org
diff --git a/manifests/role/icinga.pp b/manifests/role/icinga.pp
index 22abdb3..e73e09c 100644
--- a/manifests/role/icinga.pp
+++ b/manifests/role/icinga.pp
@@ -8,34 +8,33 @@
# [*ircbot*]
# Setup an ircbot using ircecho to support echoing notifications
#
-class role::icinga(
- $ircbot = true,
-){
+class role::icinga {
+ $ircbot = hiera('role::icinga::ircbot', true)
- # Facilities must be, unluckily, only declared once, not from multiple
hosts.
- # Forgive me for this hack while we figure out a clean way to do this.
- # This is just to unbreak icinga ASAP.
- if $::hostname == 'neon' {
- include facilities
- include lvs::monitor
+ # All common resources must be declared only once.
+ $primary = hiera('role::icinga::primary', $::hostname)
+
+ # Note that this could be done by not collecting virtual resources, but
+ # that would generate larger catalogs on the 'non-primaries', and is more
prone
+ # to error.
+ if $primary == $::hostname {
+ include icinga::monitor::checkpaging
+ include icinga::nsca::firewall
+ include icinga::nsca::daemon
+ include icinga::monitor::wikidata
+ include icinga::monitor::ores
+ include icinga::monitor::toollabs
+ include icinga::monitor::stream
+ include icinga::monitor::ripeatlas
+ include icinga::monitor::legal
+ include icinga::monitor::certs
+ include icinga::monitor::gsb
+ include icinga::monitor::commons
+ include icinga::monitor::elasticsearch
+ include role::authdns::monitoring
+ include netops::monitoring
}
- include icinga::monitor::checkpaging
- include icinga::nsca::firewall
- include icinga::nsca::daemon
- include icinga::monitor::wikidata
- include icinga::monitor::ores
- include icinga::monitor::toollabs
- include icinga::monitor::stream
- include icinga::monitor::ripeatlas
- include icinga::monitor::legal
- include icinga::monitor::certs
- include icinga::monitor::gsb
- include icinga::monitor::commons
- include icinga::monitor::elasticsearch
-
- include role::authdns::monitoring
- include netops::monitoring
include scap::dsh
include mysql
include nrpe
--
To view, visit https://gerrit.wikimedia.org/r/314537
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie238d87f472b3a71fd759652078b7b3d1914c020
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits