Alexandros Kosiaris has submitted this change and it was merged.

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(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



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: merged
Gerrit-Change-Id: I95117b791163379e63e63bad9753ee6c7e83e8a8
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: 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