Dan Journo wrote:
> Hello,
>
> I was wondering if anyone has any insights on the best way to
> automatically monitor an asterisk box to check it is constantly
> available and processing calls.
Depends on which signaling technology is in use.
I'll assume SIP here.
Checking whether it's processing calls (especially in some sort of
subjective way) can be a bit hard. But checking if the SIP interface
on it is responsive is quite easy; just install a tool called SIP
Swiss Army Knife ('sipsak'):
sipsak -T -s sip:[email protected]
sa...@octavia:~$ sipsak -T -s sip:[email protected]
warning: IP extract from warning activated to be more informational
0: ?? (70.357 ms) SIP/2.0 404 Not Found
without Contact header
Conversely, if it were down:
sa...@octavia:~$ sipsak -T -s sip:[email protected]
warning: IP extract from warning activated to be more informational
send failure: Connection refused
Or it would just time out.
This command returns a value which can be captured by a shell script,
and so it is possible to build it into something like a Nagios plugin,
for example.
--
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users