diff options
author | Micah Anderson <micah@riseup.net> | 2013-04-25 12:06:44 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-04-25 12:06:44 -0400 |
commit | 7d910cc66ea98fea4e83a3d1003bb7c3a0c6a7ce (patch) | |
tree | eaf8ac5503880e64d9d8e0e5c415ccc836e1aa81 /files | |
parent | 57a1140b437a8cfb9cfd5d94a5759b1e3ed86d45 (diff) | |
parent | a814cdad2b1ff47066df4c8b5d948f22210c0832 (diff) |
Merge branch 'master' into leap
Conflicts:
README
README.pnp4nagios
manifests/defaults/pnp4nagios.pp
manifests/munin.pp
manifests/pnp4nagios.pp
manifests/pnp4nagios/popup.pp
Diffstat (limited to 'files')
-rw-r--r-- | files/munin/nagios_hosts | 10 | ||||
-rw-r--r-- | files/munin/nagios_perf | 8 | ||||
-rw-r--r-- | files/munin/nagios_svc | 12 |
3 files changed, 21 insertions, 9 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 diff --git a/files/munin/nagios_perf b/files/munin/nagios_perf index 35fd9cd..609d62f 100644 --- a/files/munin/nagios_perf +++ b/files/munin/nagios_perf @@ -1,5 +1,9 @@ #!/bin/bash +if [ -z "$nag_stats_binary" ]; then + nag_stats_binary=/usr/sbin/nagios3stats +fi + NAME=$(basename $0) TYPE=${NAME##nagios_perf_} @@ -30,5 +34,5 @@ if [ "$1" = "config" ]; then exit 0 fi -echo "act_lat_$TYPE_ABBR.value " $(/usr/local/sbin/nagiostats --mrtg --data AVGACT${TYPE_ABBR}LAT) -echo "act_ext_$TYPE_ABBR.value " $(/usr/local/sbin/nagiostats --mrtg --data AVGACT${TYPE_ABBR}EXT) +echo "act_lat_$TYPE_ABBR.value " $($nag_stats_binary --mrtg --data AVGACT${TYPE_ABBR}LAT) +echo "act_ext_$TYPE_ABBR.value " $($nag_stats_binary --mrtg --data AVGACT${TYPE_ABBR}EXT) 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 |