summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@humppa.nl>2014-08-13 22:42:47 +0200
committerJasper Lievisse Adriaanse <jasper@humppa.nl>2014-08-13 22:42:47 +0200
commit043502d650e76ea604ef4f2e23ce2f0112f5706f (patch)
tree80a4b0d616d0bbf260e1c21b7c892a8e18e3e518 /manifests
parent5d5a542c58fc6218af6d210cf9f454da54622d1e (diff)
Allow setting an snmpversion for plugin discovery
Diffstat (limited to 'manifests')
-rw-r--r--manifests/register/snmp.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/manifests/register/snmp.pp b/manifests/register/snmp.pp
index f84785a..d3761ae 100644
--- a/manifests/register/snmp.pp
+++ b/manifests/register/snmp.pp
@@ -5,13 +5,14 @@ define munin::register::snmp (
$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'],
}