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 {
48 activate_munin_check { "spamassassin":; }
55 "logtail": ensure => installed;
57 activate_munin_check {
59 "ps_vsftpd": script => "ps_";
65 "/etc/munin/munin-node.conf":
66 content => template("munin-node/munin-node.conf.erb"),
67 require => Package["munin-node"],
68 notify => Exec["munin-node restart"];
70 "/etc/munin/plugin-conf.d/munin-node":
71 content => template("munin-node/munin-node.plugin.conf.erb"),
72 require => Package["munin-node"],
73 notify => Exec["munin-node restart"];
75 "/etc/munin/plugins/df":
76 source => "puppet:///modules/munin-node/df-wrap",
78 require => Package["munin-node"],
79 notify => Exec["munin-node restart"]
81 "/etc/munin/plugins/df_abs":
82 source => "puppet:///modules/munin-node/df-wrap",
84 require => Package["munin-node"],
85 notify => Exec["munin-node restart"]
87 "/etc/munin/plugins/df_inode":
88 source => "puppet:///modules/munin-node/df-wrap",
90 require => Package["munin-node"],
91 notify => Exec["munin-node restart"]
95 exec { "munin-node restart":
96 path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
99 @ferm::rule { "dsa-munin-v4":
100 description => "Allow munin from munin master",
101 rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN_V4 \$HOST_NAGIOS_V4) ACCEPT; }",
104 @ferm::rule { "dsa-munin-v6":
105 description => "Allow munin from munin master",
107 rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN_V6 \$HOST_NAGIOS_V6) ACCEPT; }",
113 # vim:set sts=4 ts=4:
114 # vim:set shiftwidth=4: