summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian G. Warden <cwarden@xerus.org>2012-02-02 18:19:33 -0800
committerChristian G. Warden <cwarden@xerus.org>2012-02-02 18:19:33 -0800
commitc91621a0953d97a83f62205519524708c279a24e (patch)
treedc7f1709a4b23b2dc3cc02c8f0cd48eafdd31945
parentd8de9540534a3801c87278435934da3c88a69e4b (diff)
Fix munin.conf for squeeze and later Debian releases
Add support for lsbdistcodename-specific munin.conf.header files. Create squeeze munin.conf.header file which contains the new htmldir setting, /var/cache/munin/www, and symlink wheezy and sid to it.
l---------files/config/host/munin.conf.header.Debian.sid1
-rw-r--r--files/config/host/munin.conf.header.Debian.squeeze75
l---------files/config/host/munin.conf.header.Debian.wheezy1
-rw-r--r--manifests/host.pp8
4 files changed, 82 insertions, 3 deletions
diff --git a/files/config/host/munin.conf.header.Debian.sid b/files/config/host/munin.conf.header.Debian.sid
new file mode 120000
index 0000000..5fa2037
--- /dev/null
+++ b/files/config/host/munin.conf.header.Debian.sid
@@ -0,0 +1 @@
+munin.conf.header.Debian.squeeze \ No newline at end of file
diff --git a/files/config/host/munin.conf.header.Debian.squeeze b/files/config/host/munin.conf.header.Debian.squeeze
new file mode 100644
index 0000000..771d50d
--- /dev/null
+++ b/files/config/host/munin.conf.header.Debian.squeeze
@@ -0,0 +1,75 @@
+# Example configuration file for Munin, generated by 'make build'
+
+# The next three variables specifies where the location of the RRD
+# databases, the HTML output, and the logs, severally. They all
+# must be writable by the user running munin-cron.
+dbdir /var/lib/munin
+htmldir /var/cache/munin/www
+logdir /var/log/munin
+rundir /var/run/munin
+
+# Where to look for the HTML templates
+tmpldir /etc/munin/templates
+
+# Make graphs show values per minute instead of per second
+#graph_period minute
+
+# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
+# something changes (OK -> WARNING, CRITICAL -> OK, etc)
+#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
+#contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
+#
+# For those with Nagios, the following might come in handy. In addition,
+# the services must be defined in the Nagios server as well.
+#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg
+
+#contacts me
+#contact.me.command mail -s "Munin notification ${var:group} :: ${var:host} :: ${var:graph_title}" root
+#contact.me.always_send warning critical
+
+# a simple host tree
+#[localhost]
+# address 127.0.0.1
+# use_node_name yes
+
+#
+# A more complex example of a host tree
+#
+## First our "normal" host.
+# [fii.foo.com]
+# address foo
+#
+## Then our other host...
+# [fay.foo.com]
+# address fay
+#
+## Then we want totals...
+# [foo.com;Totals] #Force it into the "foo.com"-domain...
+# update no # Turn off data-fetching for this "host".
+#
+# # The graph "load1". We want to see the loads of both machines...
+# # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
+# load1.graph_title Loads side by side
+# load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
+#
+# # The graph "load2". Now we want them stacked on top of each other.
+# load2.graph_title Loads on top of each other
+# load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
+# load2.dummy_field.draw AREA # We want area instead the default LINE2.
+# load2.dummy_field.label dummy # This is needed. Silly, really.
+#
+# # The graph "load3". Now we want them summarised into one field
+# load3.graph_title Loads summarised
+# load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
+# load3.combined_loads.label Combined loads # Must be set, as this is
+# # not a dummy field!
+#
+## ...and on a side note, I want them listen in another order (default is
+## alphabetically)
+#
+# # Since [foo.com] would be interpreted as a host in the domain "com", we
+# # specify that this is a domain by adding a semicolon.
+# [foo.com;]
+# node_order Totals fii.foo.com fay.foo.com
+#
+
diff --git a/files/config/host/munin.conf.header.Debian.wheezy b/files/config/host/munin.conf.header.Debian.wheezy
new file mode 120000
index 0000000..5fa2037
--- /dev/null
+++ b/files/config/host/munin.conf.header.Debian.wheezy
@@ -0,0 +1 @@
+munin.conf.header.Debian.squeeze \ No newline at end of file
diff --git a/manifests/host.pp b/manifests/host.pp
index 107cd39..a26c013 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -9,10 +9,12 @@ class munin::host {
concat::fragment{'munin.conf.header':
target => '/etc/munin/munin.conf',
- source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header",
- "puppet:///modules/site-munin/config/host/munin.conf.header.$operatingsystem",
+ source => [ "puppet:///modules/site-munin/config/host/${::fqdn}/munin.conf.header",
+ "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
+ "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}",
"puppet:///modules/site-munin/config/host/munin.conf.header",
- "puppet:///modules/munin/config/host/munin.conf.header.$operatingsystem",
+ "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
+ "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}",
"puppet:///modules/munin/config/host/munin.conf.header" ],
order => 05,
}