Alexandros Kosiaris has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/334149 )
Change subject: nagios: Specify a parents host relationship
......................................................................
nagios: Specify a parents host relationship
Specify a parents relationship for nagios hosts. The premise is to have
fewer alerts for hosts when a directly attached networking equipment
misbehaves causing issues. For now just rely on lldppeer_eth0 fact as a
PoC, which should also cover for > 50% of hosts easily, but leave a comment
for later improvements
Change-Id: Ie3cb1e0ea55a8349a45bbf7b9e9a3b33d7d71399
---
M modules/monitoring/manifests/host.pp
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/49/334149/1
diff --git a/modules/monitoring/manifests/host.pp
b/modules/monitoring/manifests/host.pp
index dc33d3d..d7230f8 100644
--- a/modules/monitoring/manifests/host.pp
+++ b/modules/monitoring/manifests/host.pp
@@ -47,10 +47,18 @@
$vrml_image = undef
$statusmap_image = undef
}
+ # TODO: Make this better by getting all LLDP peers on all physical (only!)
interfaces
+ # map() would have been great for this.
+ if $facts['lldppeer_eth0'] {
+ $parents = $facts['lldppeer_eth0']
+ } else {
+ $parents = undef
+ }
$host = {
"${title}" => {
ensure => $ensure,
host_name => $title,
+ parents => $parents,
address => $nagios_address,
hostgroups => $hostgroup,
check_command => 'check_ping!500,20%!2000,100%',
--
To view, visit https://gerrit.wikimedia.org/r/334149
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3cb1e0ea55a8349a45bbf7b9e9a3b33d7d71399
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits