summaryrefslogtreecommitdiff
path: root/manifests/register/snmp.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2014-12-13 09:34:56 -0500
committerGabriel Filion <gabster@lelutin.ca>2014-12-13 10:21:25 -0500
commit48272434978f95c70e34aebe9ce188157f8f935e (patch)
tree8c940d891cbcba026d56cf8ed2935361debc44fd /manifests/register/snmp.pp
parent7e03247a9e219fe8e57d544957eb06e305e69fc1 (diff)
parent27c9a5dbc2083dcc20d059008702dd3f75382bcc (diff)
Merge remote-tracking branch 'immerda/master' into merge_immerda
Conflicts: manifests/plugins/interfaces.pp $real_ifs was changed on master and we'd like to keep that change $ifs was changed to use the prefix() function and we'd like to keep that change.
Diffstat (limited to 'manifests/register/snmp.pp')
-rw-r--r--manifests/register/snmp.pp19
1 files changed, 11 insertions, 8 deletions
diff --git a/manifests/register/snmp.pp b/manifests/register/snmp.pp
index 78c3e91..8d7ea56 100644
--- a/manifests/register/snmp.pp
+++ b/manifests/register/snmp.pp
@@ -1,21 +1,24 @@
+# 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",
- unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null",
+ command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} --snmpversion ${version} --shell | sh",
+ unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null",
}
@@concat::fragment{ "munin_snmp_${fhost}":
- target => '/etc/munin/munin.conf',
- content => template("munin/client.erb"),
- tag => 'munin',
+ target => '/etc/munin/munin.conf',
+ content => template('munin/client.erb'),
+ tag => 'munin',
}
}