From 334b4a3ba627ddf481d68f8f29c925895470de62 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Mon, 27 Sep 2010 12:10:02 +0200 Subject: use better snmp register define --- manifests/register/snmp.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 manifests/register/snmp.pp (limited to 'manifests/register') 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', + } +} -- cgit v1.2.3