summaryrefslogtreecommitdiff
path: root/manifests/register/snmp.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-16 22:03:36 +0100
committervarac <varacanero@zeromail.org>2016-03-16 22:03:36 +0100
commit6c633f8606e04aad29f40a3fc0fcfdcb4b293715 (patch)
tree63d7c8a54a643cc628b9b4f7a3b941d9f508c4ad /manifests/register/snmp.pp
parent503e9296860e4d844a1ee391331996db87e0bfa6 (diff)
parent87dc315597e8ed27c2e0907615ede8a3f1521b7a (diff)
Merge remote-tracking branch 'shared/master' into leap_masterHEADmaster
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',
}
}