diff options
author | Gabriel Filion <lelutin@gmail.com> | 2012-10-17 14:49:15 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-02-27 17:01:55 -0500 |
commit | 27f0c77945444e14d77866fcd497eb21ecc662e4 (patch) | |
tree | d3a49d17900be0ea83f17bde8375f0b059fbe689 /files/munin/nagios_hosts | |
parent | cfb91ce97243e743f5af0c417851aa730ab96f41 (diff) |
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 <lelutin@gmail.com>
Diffstat (limited to 'files/munin/nagios_hosts')
-rw-r--r-- | files/munin/nagios_hosts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/files/munin/nagios_hosts b/files/munin/nagios_hosts index fa8f9dc..3fa00f1 100644 --- a/files/munin/nagios_hosts +++ b/files/munin/nagios_hosts @@ -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 host stats' echo 'graph_args --base 1000 -l 0' @@ -20,9 +24,9 @@ if [ "$1" = "config" ]; then fi echo -n 'up.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMHSTUP +$nag_stats_binary --mrtg --data NUMHSTUP echo -n 'down.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMHSTDOWN +$nag_stats_binary --mrtg --data NUMHSTDOWN echo -n 'unr.value ' -/usr/local/sbin/nagiostats --mrtg --data NUMHSTUNR +$nag_stats_binary --mrtg --data NUMHSTUNR |