diff options
author | micah <micah@muck.riseup.net> | 2013-03-20 18:25:28 -0400 |
---|---|---|
committer | micah <micah@muck.riseup.net> | 2013-03-20 18:25:28 -0400 |
commit | c9748747c5c755443d80445a9a6c3f5d2ab3bc7f (patch) | |
tree | 65887003b9bceefd7a6ba3e3692b9a6f08373304 /manifests/register/snmp.pp | |
parent | 149a78e7a8465da97f8ea267cd6a75e3bcdefe4d (diff) | |
parent | f79f662bedbbd75c7e2022da282ba48c1b323e90 (diff) |
Merge branch 'immerda/master'
Conflicts:
files/plugins/xen-cpu
templates/munin-node.conf.Debian.squeeze
Diffstat (limited to 'manifests/register/snmp.pp')
-rw-r--r-- | manifests/register/snmp.pp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/manifests/register/snmp.pp b/manifests/register/snmp.pp index 0c3ac5c..78c3e91 100644 --- a/manifests/register/snmp.pp +++ b/manifests/register/snmp.pp @@ -1,22 +1,21 @@ define munin::register::snmp ( $community = 'public', - $description = 'absent' -) -{ - $fhost = $name - $munin_host_real = $fqdn - $client_type = 'snmp' - $config = [ 'use_node_name no' ] + $description = 'absent', + $port = '4949', + $host = $::fqdn +) { + $fhost = $name + $client_type = 'snmp' + $config = [ 'use_node_name no' ] - exec { "munin_register_snmp_${fhost}": - command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} --shell | sh", - unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null", - } + exec { "munin_register_snmp_${fhost}": + command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} --shell | 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', - } + @@concat::fragment{ "munin_snmp_${fhost}": + target => '/etc/munin/munin.conf', + content => template("munin/client.erb"), + tag => 'munin', + } } |