Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/327388 )
Change subject: icinga/base: add hiera override to skip base monitoring
......................................................................
icinga/base: add hiera override to skip base monitoring
Adds a Hiera override to skip including base::monitoring::host.
This is so that test/new/decom hosts can easily disable all of it by
just editing Hiera.
This does it for the "role::spare" and as an
example to host cp1008 which is on the list from T151632.
Context is Volans' ticket description. This is just a simpler approach
to skip all of the monitoring instead of marking it in a special way
and then disabling all the notifications anways (after the config was
created).
Bug: T151632
Change-Id: I2c07a4fcd9f91a1935d14c1e61d719bb54594f02
---
M hieradata/hosts/cp1008.yaml
M hieradata/role/common/spare/system.yaml
M modules/profile/manifests/base.pp
3 files changed, 12 insertions(+), 7 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/hieradata/hosts/cp1008.yaml b/hieradata/hosts/cp1008.yaml
index b07ce38..34288d6 100644
--- a/hieradata/hosts/cp1008.yaml
+++ b/hieradata/hosts/cp1008.yaml
@@ -7,3 +7,5 @@
- 'cp1008.wikimedia.org'
codfw:
- 'cp1008.wikimedia.org'
+
+profile::base::monitoring: false
diff --git a/hieradata/role/common/spare/system.yaml
b/hieradata/role/common/spare/system.yaml
index f877951..9080e87 100644
--- a/hieradata/role/common/spare/system.yaml
+++ b/hieradata/role/common/spare/system.yaml
@@ -1,3 +1,5 @@
debdeploy::grains:
debdeploy-spare:
value: standard
+
+profile::base::monitoring: false
diff --git a/modules/profile/manifests/base.pp
b/modules/profile/manifests/base.pp
index 0fecf0d..3e27691 100644
--- a/modules/profile/manifests/base.pp
+++ b/modules/profile/manifests/base.pp
@@ -4,6 +4,7 @@
$use_apt_proxy = hiera('profile::base::use_apt_proxy', true),
$domain_search = hiera('profile::base::domain_search', $::domain),
$remote_syslog = hiera('profile::base:remote_syslog',
['syslog.eqiad.wmnet', 'syslog.codfw.wmnet']),
+ $monitoring = hiera('profile::base::monitoring', true),
$core_dump_pattern = hiera('profile::base::core_dump_pattern',
'/var/tmp/core/core.%h.%e.%p.%t'),
$ssh_server_settings = hiera('profile::base::ssh_server_settings', {}),
$nrpe_allowed_hosts = hiera('profile::base::nrpe_allowed_hosts',
'127.0.0.1,208.80.154.14,208.80.153.74,208.80.155.119'),
@@ -90,13 +91,13 @@
class { '::base::initramfs': }
}
- # include base::monitor::host.
- # if contactgroups is set, then use it
- # as the monitor host's contact group.
- class { '::base::monitoring::host':
- contact_group => $group_contact,
- nrpe_check_disk_options => $check_disk_options,
- nrpe_check_disk_critical => $check_disk_critical,
+ # unless disabled in Hiera, have Icinga monitoring (T151632)
+ if $monitoring {
+ class { '::base::monitoring::host':
+ contact_group => $group_contact,
+ nrpe_check_disk_options => $check_disk_options,
+ nrpe_check_disk_critical => $check_disk_critical,
+ }
}
if os_version('ubuntu == trusty') {
--
To view, visit https://gerrit.wikimedia.org/r/327388
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2c07a4fcd9f91a1935d14c1e61d719bb54594f02
Gerrit-PatchSet: 12
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Volans <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits