From 27f0c77945444e14d77866fcd497eb21ecc662e4 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Wed, 17 Oct 2012 14:49:15 -0400 Subject: Fix munin plugins the basic path for nagiosstats is wrong/hardcoded. that binary comes in with the nagios3 package in Debian. set the default value to the right path under Debian and make it possible to override the path with an environment variable. Signed-off-by: Gabriel Filion --- manifests/munin.pp | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) (limited to 'manifests/munin.pp') diff --git a/manifests/munin.pp b/manifests/munin.pp index 92a389f..dc5cc4c 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -1,28 +1,19 @@ -class nagios::munin inherits munin::plugins::base { +class nagios::munin { + include munin::plugins::base - munin::plugin::deploy { - nagios_hosts: - source => 'nagios/munin/nagios_hosts', - config => 'user root'; - nagios_svc: - source => 'nagios/munin/nagios_svc', - config => 'user root'; - nagios_perf_hosts: - source => 'nagios/munin/nagios_perf', - config => 'user root'; - nagios_perf_svc: - source => 'nagios/munin/nagios_perf', - config => 'user root'; - } - - exec { 'munin_nagios2stats_link': - command => 'ln -s /usr/sbin/nagios2stats /usr/local/sbin/nagiostats', - onlyif => ["test ! -e /usr/local/sbin/nagiostats", "test -e /usr/sbin/nagios2stats"], - } - - exec { 'munin_nagios3stats_link': - command => 'ln -s /usr/sbin/nagios3stats /usr/local/sbin/nagiostats', - onlyif => ["test ! -e /usr/local/sbin/nagiostats", "test -e /usr/sbin/nagios3stats"], - } + munin::plugin::deploy { + 'nagios_hosts': + source => 'nagios/munin/nagios_hosts', + config => 'user nagios'; + 'nagios_svc': + source => 'nagios/munin/nagios_svc', + config => 'user nagios'; + 'nagios_perf_hosts': + source => 'nagios/munin/nagios_perf', + config => 'user nagios'; + 'nagios_perf_svc': + source => 'nagios/munin/nagios_perf', + config => 'user nagios'; + } } -- cgit v1.2.3