From 7beae39bc53042b9fbf214653d390c988a03ad1b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 12 Mar 2014 12:31:25 -0300 Subject: Split munin-update and munin-graph on different cronjobs --- manifests/subsystem/monitor/master.pp | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'manifests/subsystem/monitor') diff --git a/manifests/subsystem/monitor/master.pp b/manifests/subsystem/monitor/master.pp index c7241b3..c93ec0e 100644 --- a/manifests/subsystem/monitor/master.pp +++ b/manifests/subsystem/monitor/master.pp @@ -24,6 +24,42 @@ class nodo::subsystem::monitor::master { }, } + # See https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html + file { '/usr/local/bin/munin-graph': + ensure => $ensure, + owner => root, + group => root, + mode => 0755, + source => 'puppet:///modules/nodo/bin/munin-graph', + } + + file { '/etc/cron.d/munin-graph': + ensure => $ensure, + owner => root, + group => root, + mode => 0644, + content => "10 * * * * munin if [ -x /usr/local/bin/munin-graph ]; then /usr/local/bin/munin-graph; fi\n", + require => File['/usr/local/bin/munin-graph'], + } + + # We won't mess with the package, so we distribute our own munin-cron + file { '/usr/local/bin/munin-cron': + ensure => $ensure, + owner => root, + group => root, + mode => 0755, + source => 'puppet:///modules/nodo/bin/munin-cron', + } + + file { '/etc/cron.d/munin': + ensure => $ensure, + owner => root, + group => root, + mode => 0644, + source => 'puppet:///modules/nodo/etc/cron.d/munin', + require => File['/usr/local/bin/munin-cron'], + } + # # See https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html # https://munin.readthedocs.org/en/latest/master/rrdcached.html -- cgit v1.2.3