From 76352415fec5c2ab6975e3a8843dd4983f7cae6a Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Wed, 9 Dec 2009 17:48:41 -0500 Subject: modify nagios plugin to work with nagios2 and nagios3 --- files/plugins/nagios_hosts | 6 +++--- files/plugins/nagios_perf_ | 4 ++-- files/plugins/nagios_svc | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'files/plugins') diff --git a/files/plugins/nagios_hosts b/files/plugins/nagios_hosts index 04fe8ed..842ef43 100755 --- a/files/plugins/nagios_hosts +++ b/files/plugins/nagios_hosts @@ -20,9 +20,9 @@ if [ "$1" = "config" ]; then fi echo -n 'up.value ' -nagios2stats --mrtg --data NUMHSTUP +nagiostats --mrtg --data NUMHSTUP echo -n 'down.value ' -nagios2stats --mrtg --data NUMHSTDOWN +nagiostats --mrtg --data NUMHSTDOWN echo -n 'unr.value ' -nagios2stats --mrtg --data NUMHSTUNR +nagiostats --mrtg --data NUMHSTUNR diff --git a/files/plugins/nagios_perf_ b/files/plugins/nagios_perf_ index f819def..4d292c7 100755 --- a/files/plugins/nagios_perf_ +++ b/files/plugins/nagios_perf_ @@ -30,6 +30,6 @@ if [ "$1" = "config" ]; then exit 0 fi -echo "act_lat_$TYPE_ABBR.value " $(nagios2stats --mrtg --data AVGACT${TYPE_ABBR}LAT) -echo "act_ext_$TYPE_ABBR.value " $(nagios2stats --mrtg --data AVGACT${TYPE_ABBR}EXT) +echo "act_lat_$TYPE_ABBR.value " $(nagiostats --mrtg --data AVGACT${TYPE_ABBR}LAT) +echo "act_ext_$TYPE_ABBR.value " $(nagiostats --mrtg --data AVGACT${TYPE_ABBR}EXT) diff --git a/files/plugins/nagios_svc b/files/plugins/nagios_svc index 3938999..86fcabf 100755 --- a/files/plugins/nagios_svc +++ b/files/plugins/nagios_svc @@ -23,11 +23,11 @@ if [ "$1" = "config" ]; then fi echo -n 'ok.value ' -nagios2stats --mrtg --data NUMSVCOK +nagiostats --mrtg --data NUMSVCOK echo -n 'warn.value ' -nagios2stats --mrtg --data NUMSVCWARN +nagiostats --mrtg --data NUMSVCWARN echo -n 'crit.value ' -nagios2stats --mrtg --data NUMSVCCRIT +nagiostats --mrtg --data NUMSVCCRIT echo -n 'unkn.value ' -nagios2stats --mrtg --data NUMSVCUNKN +nagiostats --mrtg --data NUMSVCUNKN -- cgit v1.2.3