1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-05 10:03:45 +01:00
nagios-plugins/check_cisco_qos/trunk/check_cisco_qos.sh

20 lines
527 B
Bash
Raw Normal View History

2010-10-18 12:27:58 +02:00
#!/bin/sh
# ./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 }'`
EXIT_CODE=0
for i in $CLASSES ; do
TMP=`./check_cisco_qos.pl $@ -i ALL -m $i`
STATUS=$?
if [ $STATUS -gt $EXIT_CODE ]; then
EXIT_CODE=$STATUS
fi
SUMMARY="$SUMMARY $i"
PERF=`echo $TMP | awk -F \| '{print $2 }' | sed "s/Sent/${i}_Sent/" | sed "s/Dropped/${i}_Dropped/"`
PERFDATA="$PERFDATA $PERF"
done
echo "$SUMMARY | $PERFDATA"