merge from github
[puppet_munin.git] / manifests / host.pp
1 # host.pp - the master host of the munin installation
2 # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
3 # See LICENSE for the full license granted to you.
4
5 class munin::host {
6   package {"munin": ensure => installed, }
7
8   Concat::Fragment <<| tag == 'munin' |>>
9
10   concat::fragment{'munin.conf.header':
11     target => '/etc/munin/munin.conf',
12     source => [ "puppet:///modules/site-munin/config/host/${::fqdn}/munin.conf.header",
13                 "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}",
14                 "puppet:///modules/site-munin/config/host/munin.conf.header",
15                 "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}",
16                 "puppet:///modules/munin/config/host/munin.conf.header" ],
17     order => 05,
18   }
19
20   concat{ "/etc/munin/munin.conf":
21     owner => root, group => 0, mode => 0644;
22   }
23
24   include munin::plugins::muninhost
25
26   if $munin_do_cgi_graphing {
27     include munin::host::cgi
28   }
29
30   # from time to time we cleanup hanging munin-runs
31   file{'/etc/cron.d/munin_kill':
32     content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n",
33     owner => root, group => 0, mode => 0644;
34   }
35   if $use_shorewall {
36     include shorewall::rules::out::munin
37   }
38 }