summaryrefslogtreecommitdiff
path: root/manifests/register/snmp.pp
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2010-05-14 11:02:03 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2010-05-14 18:11:55 -0400
commitf1586a7fbcc79fee6542790b1f4c930929af7e04 (patch)
tree1d68310b76034c20095dc0969b03a7d3b40d56f6 /manifests/register/snmp.pp
parent4591a91f7a8b169d0aa3ccb46357c60f8dcb7079 (diff)
refactor register class and client template
Diffstat (limited to 'manifests/register/snmp.pp')
-rw-r--r--manifests/register/snmp.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/manifests/register/snmp.pp b/manifests/register/snmp.pp
new file mode 100644
index 0000000..c0d9279
--- /dev/null
+++ b/manifests/register/snmp.pp
@@ -0,0 +1,22 @@
+define munin::register::snmp (
+ $community = 'public',
+ $description = 'absent'
+)
+{
+ $fhost = $name
+ $munin_host_real = $fqdn
+ $client_type = 'snmp'
+ $config = [ 'use_node_name no' ]
+
+ exec { "munin_register_snmp_${fhost}":
+ command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} | sh",
+ unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null",
+ }
+
+ @@file { "munin_snmp_${fhost}":
+ ensure => present,
+ path => "/var/lib/puppet/modules/munin/nodes/${fhost}",
+ content => template("munin/client.erb"),
+ tag => 'munin',
+ }
+}