diff options
author | mh <mh@immerda.ch> | 2009-09-29 22:51:15 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-09-29 22:51:15 +0200 |
commit | 1893960c1babb6a261cc6fc399231e9c0644a104 (patch) | |
tree | 7e4fb1f3d2d34490b8d5cfff50d6f9cadf890fb9 /manifests/plugins/base.pp | |
parent | c63a28d3c16ec2bb3a46d3d5faf6d7ef3b737b70 (diff) |
refactor everything into its own file
Diffstat (limited to 'manifests/plugins/base.pp')
-rw-r--r-- | manifests/plugins/base.pp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp new file mode 100644 index 0000000..9f47f6b --- /dev/null +++ b/manifests/plugins/base.pp @@ -0,0 +1,49 @@ +class munin::plugins::base { + file { + [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: + source => "puppet://$server/common/empty", + ignore => [ '\.ignore', 'snmp_*' ], + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => 0, + notify => Service['munin-node']; + '/etc/munin/plugin-conf.d/munin-node': + ensure => present, + mode => 0644, owner => root, group => 0, + notify => Service['munin-node'], + } + + munin::plugin { + [ df, cpu, interrupts, load, memory, netstat, open_files, + processes, swap, uptime, users, vmstat + ]: + ensure => present, + } + include munin::plugins::interfaces + + case $kernel { + openbsd: { + File['/etc/munin/plugin-conf.d/munin-node']{ + before => File['/var/run/munin'], + } + } + default: { + File['/etc/munin/plugin-conf.d/munin-node']{ + before => Package['munin-node'], + } + } + } + case $kernel { + linux: { + case $vserver { + guest: { include munin::plugins::vserver } + default: { + include munin::plugins::linux + } + } + } + } + case $virtual { + physical: { include munin::plugins::physical } + xen0: { include munin::plugins::dom0 } + } |