[Asterisk-Users] monitoring

altus altus at stormcorp.co.za
Tue May 31 22:16:21 MST 2005


What I done is
On the asterisk box I out this in crontab for each min.
ps -ax | grep -v grep | grep -i asterisk || echo "asterisk not running"
|mail -s "asterisk on XDFS is down" me at mycompany.co.za
this will mail me if asterisk isnt running
We have a cell provider that offers email to sms so I can just add a cc
option
Also running on the box,each morning at 7am it does

asterisk -rx 'sip show peers' >> /tmp/file
sleep 5
cat /tmp/file | mail -s "Check sip users @ company"  me at mycompany


Then
On the asterisk box I enable iax2,so that port 4569(tcp) is open
Then I get a app called udpping(got it off the wiki)
This will do a udp ping on a ip for port 4569
So
On a different box,I do in the crontab for each 5min

/bin/udpping 1.2.3.4 || echo "no connection to the box" | mail -s "no
connection" me at mtcompany.co.za

Or you could just use nagios 
And another app is called swat,does a tail&grep on log files
(/var/log/asterisk/messages) and greps for words and mails you if it
finds it
But this works for me
Let me know how it goes
ALtus
altus at stormcorp.co.za
On Tue, 2005-05-31 at 18:11 -0500, jltaylor wrote:
> Has anyone done any scripts (or something else) to notify if something goes
> down?
> 
> Example:
> 
> Asterisk_1 is peered to Asterisk_2
> Asterisk_1 has qualify=yes
> Asterisk_1 notices that Asterisk_2 is not responding
> Asterisk_1 sends email to cell phone "Asterisk_2 peer down"
> 
> 
> James Taylor
> MetroTel
> 3505 Summerhill Road
> Suite 11
> Texarkana, Tx  75503
> 903-793-1956
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list