munin: Added automatic configuration to munin::snmpnode
This commit is contained in:
parent
556b6dbc8c
commit
a48040c544
1 changed files with 9 additions and 1 deletions
|
@ -123,7 +123,15 @@ define munin::snmpnode($snmp_community="public", $snmp_version="2") {
|
|||
default => "root",
|
||||
},
|
||||
mode => "0600",
|
||||
notify => Service["munin-node"],
|
||||
notify => Exec["munin-snmp-configure-${name}"],
|
||||
}
|
||||
|
||||
exec { "munin-snmp-configure-${name}":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
||||
command => "munin-node-configure --snmp ${name} --snmpcommunity ${snmp_community} --shell 2>/dev/null | /bin/sh",
|
||||
user => "root",
|
||||
refreshonly => true,
|
||||
notify => Service["munin-node"],
|
||||
}
|
||||
|
||||
@@file { "/etc/munin/conf.d/${name}.conf":
|
||||
|
|
Loading…
Add table
Reference in a new issue