[Asterisk-Users] Polling Asterisk for Life

David Cook dbc_asterisk at advan.ca
Thu Mar 2 13:47:40 MST 2006


Obviously if Asterisk keeps going down there is another problem to be 
found. However, why not start it from /etc/inittab with respawn??? Else, 
poll from cron or a script with ps ax | grep asterisk | grep -v grep | 
wc -l to find out if it is running. dbc. Date: Thu, 2 Mar 2006 22:01:01 
+0200 From: "Cosmin Prund" <cosmin at adicomsoft.ro> Subject: RE: 
[Asterisk-Users] Polling Asterisk for Life To: "'Asterisk Users Mailing 
List - Non-Commercial Discussion'" <asterisk-users at lists.digium.com> 
Message-ID: <026301c63e34$08d7a6d0$a3512356 at adicomsoft> Content-Type: 
text/plain; charset="us-ascii" AFAIK there are problems with repeatedly 
connecting and disconnecting the manager interface. Also you're probably 
using a proxy (all "manager" interfaces I've seen are using proxies), it 
might not be a good idea to pool something out of the manager that 
often. Did you consider running a "cron" job on the server, using 
"asterisk -rx" to run a command and then decide rather asterisk is down 
or not based on the result? This way you'd be doing on the server, 
working around the problems with the manager interface and saving some 
bandwidth :) . You might also be able to call /sbin/reboot directly from 
the cron script! If on the other hand the whole server is going down you 
may simply use ping!

> > -----Original Message-----
> > From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> > bounces at lists.digium.com] On Behalf Of Matt
> > Sent: Thursday, March 02, 2006 7:47 PM
> > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > Subject: [Asterisk-Users] Polling Asterisk for Life
> > 
> > Hi,
> > Occassionally Asterisk will go down and I have to restart it.. not
> > often.. but sometimes.  When it does the manager interface stops
> > working, as does the CLI.
> > 
> > My thoughts was to poll the manager interface once every 5 minutes for
> > a value.  If I don't get the value back then alert me that the server
> > is possibly down.
> > 
> > Does anyone know what a good value to poll for might be?   I was
> > thinking I could poll my SIP account for the CallWaiting value, but
> > would like something that was not linked to my account.
> > 
> > Just something that returns a single line is fine.



More information about the asterisk-users mailing list