From e4cdc52cf7b1b43e2dea82bc3f5712364cfda0b9 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Mon, 18 Jan 2010 14:13:36 +0000 Subject: [PATCH] first stab at munin.conf template Signed-off-by: Stephen Gran --- manifests/site.pp | 1 + modules/munin-node/manifests/master.pp | 11 +++++++++++ modules/munin-node/templates/munin.conf.erb | 21 +++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 modules/munin-node/manifests/master.pp create mode 100644 modules/munin-node/templates/munin.conf.erb diff --git a/manifests/site.pp b/manifests/site.pp index 64b54d2dd..2bc7939d8 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -51,6 +51,7 @@ node default { case $hostname { spohr: { include nagios::server + include munin-node::master } default: { include nagios::client diff --git a/modules/munin-node/manifests/master.pp b/modules/munin-node/manifests/master.pp new file mode 100644 index 000000000..c7eb80b50 --- /dev/null +++ b/modules/munin-node/manifests/master.pp @@ -0,0 +1,11 @@ +class munin-node::master inherits munin-node { + + package { munin: ensure => installed } + + file { + "/etc/munin/munin.conf": + content => template("munin/munin.conf.erb"), + require => Package["munin"]; + } +} + diff --git a/modules/munin-node/templates/munin.conf.erb b/modules/munin-node/templates/munin.conf.erb new file mode 100644 index 000000000..c04c5cca5 --- /dev/null +++ b/modules/munin-node/templates/munin.conf.erb @@ -0,0 +1,21 @@ +## +### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +dbdir /var/lib/munin +htmldir /var/www/munin +logdir /var/log/munin +rundir /var/run/munin +tmpldir /etc/munin/templates +graph_strategy cgi + +<%= out = '' + localinfo.keys.sort.each do |node| + out += '[ ' + node + ' ] + address ' + node + ' + +' + end +out +%> -- 2.20.1