Hello jenkins-bot,

I'd like you to do a code review.  Please visit

    https://gerrit.wikimedia.org/r/343036

to review the following change.


Change subject: Revert "Revert "nagios: Specify a parents host relationship""
......................................................................

Revert "Revert "nagios: Specify a parents host relationship""

Only merge this when we have our networking devices in icinga

This reverts commit 0d4c9bbfd541e3e62781ecb68fabd47956f38a26.

Change-Id: I65abe9d32b7342a08002c9efdfcbb790f5f1e7c9
---
M modules/monitoring/manifests/host.pp
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/343036/1

diff --git a/modules/monitoring/manifests/host.pp 
b/modules/monitoring/manifests/host.pp
index f13e20a..2d8d5e2 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/343036
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65abe9d32b7342a08002c9efdfcbb790f5f1e7c9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to