]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Manage rrdcached on nodo::subsystem::monitor::master
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 18 Jan 2014 17:54:34 +0000 (15:54 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 18 Jan 2014 17:54:34 +0000 (15:54 -0200)
files/etc/default/rrdcached [new file with mode: 0644]
manifests/subsystem/monitor/master.pp

diff --git a/files/etc/default/rrdcached b/files/etc/default/rrdcached
new file mode 100644 (file)
index 0000000..43d4ac8
--- /dev/null
@@ -0,0 +1,22 @@
+# /etc/default/rrdcached
+
+# 0: start rrdcached on boot, 1: do not start rrdcached on boot
+# default: 0
+DISABLE=0
+
+# options to be passed to rrdcached
+# (do not specify -p <pidfile> - this is handled by the init script)
+# default: see /etc/init.d/rrdcached
+#OPTS=""
+OPTS="-s munin -l unix:/var/run/rrdcached.sock -j /var/lib/rrdcached/journal/ -F -b /var/lib/munin/ -B -w 1800 -z 1800 -f 3600"
+
+# number of seconds to wait for rrdcached to shut down
+# (writing the data to disk may take some time;
+# tune this according to your setup)
+# default: 30
+MAXWAIT=30
+
+# 0: do not enable core-files, 1: enable core-files ... if rrdcached crashes
+# default: 0
+ENABLE_COREFILES=0
+
index 6895617536f982cfacc8d7e488952d956a0d71ec..44de95bc551f8ffef3694c9ed9ef98325b61e679 100644 (file)
@@ -6,4 +6,27 @@ class nodo::subsystem::monitor::master {
     source  => 'puppet:///modules/nodo/etc/nagios-plugins/check_rbl.ini',
     require => Package['nagios'],
   }
+
+  #
+  # 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
+  #
+  package { 'rrdcached':
+    ensure => present,
+  }
+
+  file { '/etc/default/rrdcached':
+    ensure  => present,
+    owner   => root,
+    group   => root,
+    source  => 'puppet:///modules/nodo/etc/default/rrdcached',
+    require => Package['rrdcached'],
+    notify  => Service['rrdcached'],
+  }
+
+  service { 'rrdcached':
+    ensure  => running,
+    require => Package['rrdcached'],
+  }
 }