[asterisk-users] Asterisk Monitoring

Alex Balashov abalashov at evaristesys.com
Sat Oct 17 19:28:20 CDT 2009


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:s at ip.of.your.asterisk.box

sasha at octavia:~$ sipsak -T -s sip:s at 10.250.10.1
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:

sasha at octavia:~$ sipsak -T -s sip:s at 10.250.10.6
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



More information about the asterisk-users mailing list