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