Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: icinga: Kill hostextinfo
......................................................................

icinga: Kill hostextinfo

hostextinfo is basically deprecated since Nagios 3.0. That amount of
data is meant to be moved into the host definition. Adjust the
corresponding if clause and merge the hostextinfo stanza into the host
stanza.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/315090/1

diff --git a/modules/monitoring/manifests/host.pp 
b/modules/monitoring/manifests/host.pp
index fc7e06d..f83c58d 100644
--- a/modules/monitoring/manifests/host.pp
+++ b/modules/monitoring/manifests/host.pp
@@ -33,6 +33,21 @@
     }
 
     # Export the nagios host instance
+    if $title == $::hostname {
+        $image = $::operatingsystem ? {
+            'Ubuntu'  => 'ubuntu',
+            'Debian'  => 'debian',
+            default   => 'linux40'
+        }
+        $icon_image      = "base/${image}.png"
+        $vrml_image      = "base/${image}.png"
+        $statusmap_image = "base/${image}.gd2"
+    } else {
+        $image = undef
+        $icon_image      = undef
+        $vrml_image      = undef
+        $statusmap_image = undef
+    }
     @@nagios_host { $title:
         ensure                => $ensure,
         target                => '/etc/nagios/puppet_hosts.cfg',
@@ -46,24 +61,9 @@
         notification_interval => 0,
         notification_period   => '24x7',
         notification_options  => 'd,u,r,f',
-    }
-
-    if $title == $::hostname {
-        $image = $::operatingsystem ? {
-            'Ubuntu'  => 'ubuntu',
-            'Debian'  => 'debian',
-            default   => 'linux40'
-        }
-
-        # Couple it with some hostextinfo
-        @@nagios_hostextinfo { $title:
-            ensure          => $ensure,
-            target          => '/etc/nagios/puppet_hostextinfo.cfg',
-            host_name       => $title,
-            notes           => $title,
-            icon_image      => "base/${image}.png",
-            vrml_image      => "base/${image}.png",
-            statusmap_image => "base/${image}.gd2",
-        }
+        image                 => $image,
+        icon_image            => $icon_image,
+        vrml_image            => $vrml_image,
+        statusmap_image       => $statusmap_image,
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/315090
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95117b791163379e63e63bad9753ee6c7e83e8a8
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

Reply via email to