class nodo::subsystem::monitor::master { file { '/etc/nagios-plugins/check_rbl.ini': ensure => present, owner => root, group => root, source => 'puppet:///modules/nodo/etc/nagios-plugins/check_rbl.ini', require => Package['nagios'], } $main = hiera('nodo::role::master::main', false) $ensure = $main ? { true => 'present', default => 'absent', } # See http://www.jethrocarr.com/2012/05/26/munin-performance/ file { "munin_graph_performance": ensure => $ensure, path => "/var/lib/puppet/modules/munin/nodes/00-performance", content => "max_graph_jobs 1\n max_cgi_graph_jobs 1\nfork no\n", } # # See https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html # https://munin.readthedocs.org/en/latest/master/rrdcached.html # http://kuszelas.eu/~eyck/log/Howto/Munin.Rrdcached.html # http://munin-monitoring.org/wiki/rrdcached # package { 'rrdcached': ensure => $ensure, } file { '/etc/default/rrdcached': ensure => $ensure, owner => root, group => root, source => 'puppet:///modules/nodo/etc/default/rrdcached', require => Package['rrdcached'], notify => $main ? { true => Service['rrdcached'], default => undef, }, } # Munin configuration for rrdcache file { "munin_rrdcache": ensure => $ensure, path => "/var/lib/puppet/modules/munin/nodes/00-rrdcache", content => "rrdcached_socket /var/run/rrdcached.sock\n", } if $main == true { service { 'rrdcached': ensure => running, require => Package['rrdcached'], } } }