]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/munin-node/manifests/init.pp
some default munin plugins for everyone
[dsa-puppet.git] / modules / munin-node / manifests / init.pp
1 define activate_munin_check() {
2        file { "/etc/munin/plugins/$name":
3                 ensure => "/usr/share/munin/plugins/$name",
4                 notify => Exec["munin-node restart"];
5         }
6 }
7
8 class munin-node {
9
10     package { munin-node: ensure => installed }
11
12     activate_munin_check {
13         "cpu":;
14         "df":;
15         "df_inode":;
16         "entropy":;
17         "forks":;
18         "interrupts":;
19         "iostat":;
20         "irqstats":;
21         "load":;
22         "memory":;
23         "ntp_offset":;
24         "open_files":;
25         "open_inodes":;
26         "processes":;
27         "swap":;
28         "vmstat":;
29     }
30
31     file { "/etc/munin/munin-node.conf":
32         source  => [ "puppet:///munin-node/per-host/$fqdn/munin-node.conf",
33                      "puppet:///munin-node/common/munin-node.conf" ],
34         require => Package["munin-node"],
35         notify  => Exec["munin-node restart"],
36     }
37
38     exec { "munin-node restart":
39         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
40         refreshonly => true,
41     }
42 }
43