1 define activate_munin_check($ensure=present, $script = none) {
3 none: { $link = $name }
4 default: { $link = $script }
9 file { "/etc/munin/plugins/$name":
10 ensure => "/usr/share/munin/plugins/$link",
11 notify => Exec["munin-node restart"];
15 file { "/etc/munin/plugins/$name":
17 notify => Exec["munin-node restart"];
25 package { munin-node: ensure => installed }
27 activate_munin_check {
51 activate_munin_check { "spamassassin":; }
57 include munin-node::vsftpd
62 "/etc/munin/munin-node.conf":
63 content => template("munin-node/munin-node.conf.erb"),
64 require => Package["munin-node"],
65 notify => Exec["munin-node restart"];
67 "/etc/munin/plugin-conf.d/munin-node":
68 content => template("munin-node/munin-node.plugin.conf.erb"),
69 require => Package["munin-node"],
70 notify => Exec["munin-node restart"];
73 exec { "munin-node restart":
74 path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
77 @ferm::rule { "dsa-munin-v4":
78 description => "Allow munin from munin master",
79 rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN_V4 \$HOST_NAGIOS_V4) ACCEPT; }"
81 @ferm::rule { "dsa-munin-v6":
82 description => "Allow munin from munin master",
84 rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN_V6 \$HOST_NAGIOS_V6) ACCEPT; }"