[asterisk-users] Nagios under *

Sriram d_r_sriram at hotmail.com
Thu Jun 18 13:15:10 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=""

       STATUS=$(asterisk -rnx "pri show span 1" | grep -a Status | awk '{print $3;}' | cut -d, -f1)
       if [ "${STATUS}" == "Up" ]; then
  echo "PRI UP"
              exit 0
        else
  echo "PRI DOWN"
              exit 2
       fi

if i execute the script from command line i get the correct output i.e OK for span 1 but on nagios web interface i get it as down...
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/4fbb307e/attachment.htm 


More information about the asterisk-users mailing list