From 1893960c1babb6a261cc6fc399231e9c0644a104 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:51:15 +0200 Subject: refactor everything into its own file --- manifests/plugins/base.pp | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 manifests/plugins/base.pp (limited to 'manifests/plugins/base.pp') 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 } + } -- cgit v1.2.3