[Asterisk-Users] Polling Asterisk for Life
Matt
mhoppes at gmail.com
Thu Mar 2 13:40:09 MST 2006
Yup.. that's the exact problem I'm having. I really can't explain
what happens. If I don't restart asterisk it seems to happen after
about 2 days. So I restart asterisk once a day at 3am. And it still
goes down about once a month...
On 3/2/06, Joseph Tanner <joseph at thetechguide.com> wrote:
> He's probably having a similar problem I had, where asterisk stops
> responding to any commands at all (whether it's "bluetooth show
> peers", "sip show registry", or even "stop now"; all that works is
> "exit"). Well, I guess I can't say any commands at all, I haven't
> tried every single one.
>
> I upgraded to 1.2.4 to try to resolve this problem (was running
> 1.2.1). It seems to be running ok now, but has not been long enough
> to tell for sure. If it messes up again, I will try to remember to
> issue the command "show license". If it doesn't respond to that, then
> that should be a good command to use to test if asterisk is
> responding. Just grep for part of the output it should give you, and
> if it's missing just killall -9 asterisk, and restart, and hopefully
> it works then. You could give your script some smarts if you wanted.
> If it passes the test, then the script is done. If it fails, then
> kill asterisk, restart, wait an appropriate amount of time to let it
> come back online fully (if it usually takes 30 seconds, give it 2
> minutes just in case, if it takes 2 minutes give it 5, etc.).
> Re-issue the command, if asterisk still does not respond (possibly
> killall didn't work, or there's another issue keeping asterisk from
> working properly) then issue a reboot (or alternatively you could shut
> down more services such as zaptel, attempt to bring it all back online
> again, and if it still doesn't work then reboot; personally I'd rather
> just reboot and send some kind of alert to me).
>
> Joseph Tanner
>
> On 3/2/06, Cosmin Prund <cosmin at adicomsoft.ro> wrote:
> > 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.
> > > _______________________________________________
> > > --Bandwidth and Colocation provided by Easynews.com --
> > >
> > > Asterisk-Users mailing list
> > > To UNSUBSCRIBE or update options visit:
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > Asterisk-Users mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list