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 --- files/munin/nagios_svc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'files/munin/nagios_svc') diff --git a/files/munin/nagios_svc b/files/munin/nagios_svc index 0a9a9bf..97c8bfc 100644 --- a/files/munin/nagios_svc +++ b/files/munin/nagios_svc @@ -1,5 +1,9 @@ #!/bin/bash +if [ -z "$nag_stats_binary" ]; then + nag_stats_binary=/usr/sbin/nagios3stats +fi + if [ "$1" = "config" ]; then echo 'graph_title Nagios service stats' echo 'graph_args --base 1000 -l 0' @@ -23,11 +27,11 @@ if [ "$1" = "config" ]; then fi echo -n 'ok.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMSVCOK +$nag_stats_binary --mrtg --data NUMSVCOK echo -n 'warn.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMSVCWARN +$nag_stats_binary --mrtg --data NUMSVCWARN echo -n 'crit.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMSVCCRIT +$nag_stats_binary --mrtg --data NUMSVCCRIT echo -n 'unkn.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMSVCUNKN +$nag_stats_binary --mrtg --data NUMSVCUNKN -- cgit v1.2.3