]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Configuring apc_nis munin plugin
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 5 Jun 2013 18:36:21 +0000 (15:36 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 5 Jun 2013 18:36:21 +0000 (15:36 -0300)
manifests/defines/munin_node.pp
manifests/subsystem/ups.pp

index aef5148ba16bbcdae892ed7d45c28d89366f5ddc..f867fd3d37ad1949abac910168246428c453fa8e 100644 (file)
@@ -11,6 +11,10 @@ define munin_node(
     '': { fail("Please set nodo::munin_node::allow in your config") }
   }
 
+  package { "munin-plugins-extra":
+    ensure => "present",
+  }
+
   class { 'munin::client':
     port   => $port,
     allow  => $allow,
index d3044182e7a39293db22775802c99663ff3fa67e..9802d26a51168aae948cce261d9422f02e526008 100644 (file)
@@ -21,6 +21,14 @@ class nodo::subsystem::ups(
         batterylevel   => $batterylevel,
         minutes        => $minutes,
       }
+
+      # Graph local UPS
+      munin::plugin { apc_nis:
+        ensure => $nisip ? {
+          '127.0.0.1' => present,
+          default     => absent,
+        }
+      }
     }
   }
 }