4625ba9e389c89ebefc4045fcac5da539ddc6a04
[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 {
7         package { [ "munin", "nmap"]: ensure => installed, }
8
9         File <<| tag == 'munin' |>>
10
11         concatenated_file { "/etc/munin/munin.conf":
12                 dir => $NODESDIR,
13                 header => "/etc/munin/munin.conf.header",
14         }
15
16     file { ["/var/log/munin-update.log", "/var/log/munin-limits.log", 
17                "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
18         ensure => present,
19         mode => 640, owner => munin, group => 0;
20     }
21
22     include munin::plugins::muninhost
23 }
24
25 class munin::snmp_collector
26 {
27
28         file { 
29                 "/var/lib/puppet/modules/munin/create_snmp_links":
30                         source => "puppet://$servername/munin/create_snmp_links.sh",
31                         mode => 755, owner => root, group => 0;
32         }
33
34         exec { "create_snmp_links":
35                 command => "/var/lib/puppet/modules/munin/create_snmp_links $NODESDIR",
36                 require => File["snmp_links"],
37                 timeout => "2048",
38                 schedule => daily
39         }
40 }