summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-09-13 05:17:25 +0200
committermh <mh@immerda.ch>2014-09-13 05:17:25 +0200
commit75b3bef2f706fabb6788c8dfd9654299ae8b8217 (patch)
treebc1a8f019651160b9aff064a3088cd8244260571
parentec4e2ba4f6f90116927ead35fca8c525a64a9e57 (diff)
parent043502d650e76ea604ef4f2e23ce2f0112f5706f (diff)
Merge branch 'snmp' of https://github.com/jasperla/puppet-munin into jasperla-snmp
-rw-r--r--manifests/register/snmp.pp11
1 files changed, 7 insertions, 4 deletions
diff --git a/manifests/register/snmp.pp b/manifests/register/snmp.pp
index 06bb00b..d3761ae 100644
--- a/manifests/register/snmp.pp
+++ b/manifests/register/snmp.pp
@@ -1,17 +1,20 @@
# Register a munin node with snmp enabled
define munin::register::snmp (
- $community = 'public',
+ $community = 'public',
$description = 'absent',
- $port = '4949',
- $host = $::fqdn
+ $port = '4949',
+ $host = $::fqdn,
+ $group = 'absent',
+ $version = '2',
) {
$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",
+ command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} --snmpversion ${version} --shell | sh",
unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null",
+ path => ['/bin','/sbin','/usr/bin','/usr/sbin','/usr/local/bin','/usr/local/sbin'],
}
@@concat::fragment{ "munin_snmp_${fhost}":