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 source => [ "puppet:///munin-node/per-host/$fqdn/munin-node.conf",
64 "puppet:///munin-node/common/munin-node.conf" ],
65 require => Package["munin-node"],
66 notify => Exec["munin-node restart"];
68 "/etc/munin/plugin-conf.d/munin-node":
69 content => template("munin-node/munin-node.plugin.conf.erb"),
70 require => Package["munin-node"],
71 notify => Exec["munin-node restart"];
74 exec { "munin-node restart":
75 path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
78 @ferm::rule { "dsa-munin":
79 description => "Allow munin from munin master",
80 rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN) ACCEPT; }"