1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-12-22 09:03:54 +01:00
This commit is contained in:
Páll Guðjón Sigurðsson 2010-10-18 12:26:24 +00:00
parent a779a22337
commit b07d99699e

View File

@ -2,10 +2,24 @@
# ./check_cisco_qos.pl -H 10.18.0.114 -C KB816af -w 10 -c 20 -i ALL -m Call_Signaling
CLASSES=`./check_cisco_qos.pl $@ -i ALL -m ALL -d | grep qos-class| awk '{ print $6 }'`
PATH=$PATH:/usr/lib/nagios/plugins/:/usr/lib64/nagios/plugins/:/nagios/usr/lib/nagios/plugins
which check_cisco_qos.pl > /dev/null
if [ $? -gt 0 ]; then
echo "Unknown check_cisco_qos.pl not found in path"
exit 3
fi
CLASSES=`check_cisco_qos.pl $@ -i ALL -m ALL -d | grep qos-class| awk '{ print $6 }'`
NUM_CLASSES=`echo $CLASSES |wc -w`
if [ $NUM_CLASSES -lt 1 ]; then
echo "Error running check_cisco_qos.pl"
echo "Command was: check_cisco_qos.pl $@ -i ALL -m ALL -d"
exit 3
fi
EXIT_CODE=0
for i in $CLASSES ; do
TMP=`./check_cisco_qos.pl $@ -i ALL -m $i`
TMP=`check_cisco_qos.pl $@ -i ALL -m $i`
STATUS=$?
if [ $STATUS -gt $EXIT_CODE ]; then
EXIT_CODE=$STATUS