[asterisk-users] Nagios Asterisk
Sriram
d_r_sriram at hotmail.com
Wed Jun 17 13:34:26 CDT 2009
Hi
I am trying to implement monitoring of asterisk (all 4 spans-i want to show them line by line Up or down) using nagios using below script, but i always get the status as down and red..can anyone let me know how to read an output from nagios plugin ? nagios etc is configured already and is working
PATH=/bin:/sbin:/usr/bin:/usr/sbin
FAILS=""
SPANS=$(asterisk -rnx "pri show span 1" | grep -a PRI | awk '{print $3;}' | cut -d"/" -f1)
STATUS=$(asterisk -rnx "pri show span 1" | grep -a Status | awk '{print $3;}' | cut -d, -f1)
if [ $STATUS == "Up" ]; then
FAILS= "UP"
else
FAILS="Down"
fi
if [ $FAILS != "UP" ]; then
echo "ISDN Lines down"
exit 2
fi
echo "ISDN OK "
exit 0
If anyone can share the above script for asterisk monitoring then i wud be grateful
rgds
Sriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090618/7154eaf2/attachment.htm
More information about the asterisk-users
mailing list