[asterisk-users] Nagios under *
Danny Nicholas
danny at debsinc.com
Fri Jun 19 13:31:56 CDT 2009
Do you need to path sudo (/usr/sbin/sudo)? Try running the script as nobody
and see what happens.
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Sriram
Sent: Friday, June 19, 2009 1:21 PM
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] Nagios under *
Hi Steve
I tried your script :
STATUS=$(sudo asterisk -rnx "pri show span 1"\
| awk '/Status/ {print $3}'\
)
if [ "Up," == "${STATUS}" ]
then echo "PRI UP"
exit 0
else echo "PRI DOWN"
exit 2
fi
but still i get PRI down in the Nagios web interface while if i execute this
command from command line i get PRI UP...i m really going mad..did a clean
install again but still same problem.. Iv;e also given permission of 777 to
the script and saved it under /usr/local/nagios and given the same path in
commands.cfg under objects folder of /usr/local/nagios/etc ... can anyone
please help me out ?
Thanks Sriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090619/4602b61a/attachment.htm
More information about the asterisk-users
mailing list