diff options
author | Micah Anderson <micah@riseup.net> | 2009-12-22 19:29:23 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-12-22 19:29:23 -0500 |
commit | 42c94b4fad526b25852c7bcaf053f441bac38c9e (patch) | |
tree | 89a8da279ba7190a350ade72bc52cda90362c4b7 /manifests/host.pp | |
parent | 577ff440b791ab67de77b20440b5e385fe1c9572 (diff) | |
parent | 76352415fec5c2ab6975e3a8843dd4983f7cae6a (diff) |
Merge commit '76352415fec5c2ab6975e3a8843dd4983f7cae6a'
Conflicts:
README
lib/facter/acpi_available.rb
lib/facter/interfaces.rb
lib/facter/munin_interfaces.rb
manifests/client.pp
manifests/host.pp
manifests/init.pp
manifests/plugin.pp
plugins/facter/interfaces.rb
templates/defaultclient.erb
templates/munin-node.conf.Debian.lenny
Diffstat (limited to 'manifests/host.pp')
-rw-r--r-- | manifests/host.pp | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/manifests/host.pp b/manifests/host.pp index 804bd02..9fd637d 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,55 +2,45 @@ # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at> # See LICENSE for the full license granted to you. -class munin::host +class munin::host inherits munin { - package { [ "munin", "nmap"]: ensure => installed, } + package {"munin": ensure => installed, } File <<| tag == 'munin' |>> + file{'/etc/munin/munin.conf.header': + source => [ "puppet://$server/modules/site-munin/config/host/${fqdn}/munin.conf.header", + "puppet://$server/modules/site-munin/config/host/munin.conf.header.$operatingsystem", + "puppet://$server/modules/site-munin/config/host/munin.conf.header", + "puppet://$server/modules/munin/config/host/munin.conf.header.$operatingsystem", + "puppet://$server/modules/munin/config/host/munin.conf.header" ], + notify => Exec['concat_/etc/munin/munin.conf'], + owner => root, group => 0, mode => 0644; + } + concatenated_file { "/etc/munin/munin.conf": - dir => $NODESDIR, + dir => '/var/lib/puppet/modules/munin/nodes', header => "/etc/munin/munin.conf.header", } - - file { - "/etc/munin/munin.conf.header": - source => "/etc/munin/munin.conf", - replace => no, # only initialise - mode => 0644, owner => root, group => 0, - before => File["/etc/munin/munin.conf"]; - } - file { ["/var/log/munin-update.log", "/var/log/munin-limits.log", - "/var/log/munin-graph.log", "/var/log/munin-html.log"]: - ensure => present, - mode => 640, owner => munin, group => root; + file { ["/var/log/munin-update.log", "/var/log/munin-limits.log", + "/var/log/munin-graph.log", "/var/log/munin-html.log"]: + ensure => present, + mode => 640, owner => munin, group => 0; + } + + include munin::plugins::muninhost + + case $operatingsystem { + centos: { include munin::host::cgi } + } + + # from time to time we cleanup hanging munin-runs + file{'/etc/cron.d/munin_kill': + content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n", + owner => root, group => 0, mode => 0644; + } + if $use_shorewall { + include shorewall::rules::out::munin } - -} - -class munin::snmp_collector -{ - - file { - "${module_dir_path}/munin/create_snmp_links": - source => "puppet://$server/modules/munin/create_snmp_links.sh", - mode => 755, owner => root, group => root; - } - - exec { "create_snmp_links": - command => "${module_dir_path}/munin/create_snmp_links $NODESDIR", - require => File["snmp_links"], - timeout => "2048", - schedule => daily - } -} - -define munin::apache_site() -{ - apache::site { - $name: - ensure => present, - content => template("munin/site.conf") - } } |