Home Directory Plugins Telephony Asterisk Asterisk PRI Status

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Asterisk PRI Status

Rating
6 votes
Favoured:
0
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
A Nagios plugin which queries Asterisk's manager interface and executes the pri show spans CLI command (this is Asterisk 1.4 by the way).
A Nagios plugin which queries Asterisk's manager interface and executes the pri show spans CLI command (this is Asterisk 1.4 by the way). The script then parses the output to ascertain whether a PRI is up or not, whether the expected number of PRIs were found, if there are enough to satisfy warning/critical levels, etc.

It will also check for and report connection issues, bad username/password and wrong permissions.

Written in PHP.

Download link: http://www.opensolutions.ie/misc/check_asterisk_pri.php.txt
Reviews (4)
byiBrewBeer, May 27, 2014
Getting same thing as above commenter. It's not doing anything.
bylos, January 30, 2014
1 of 1 people found this review helpful
Works great! However, if you're using PHP5, you're likely going to run into a PHP Notice error message:

PHP Notice: Undefined variable: asttext in /check_asterisk_pri on line 181

To remedy this, just replace the following code:

while( !feof ( $astsock ))
{
$asttext .= fread( $astsock, 8192);
}

with the following:

$asttext = stream_get_contents($astsock);

Thanks for making this...we've been having odd problems with PRI syncing and this keeps us informed.
bysocain, March 14, 2012
If you send the right parameters and configure asterisk manager account it works great. It broke after an upgrade to asterisk 1.8.9 because they take out the word "Provisioned" in "pri show spans", so had to add the following code:

else if( strpos( $segment, "Up, Active" ) !== FALSE )
$lines[$count]['up'] = 1;


Just after the existing section/code:

if( strpos( $segment, "Provisioned, Up, Active" ) !== FALSE )
$lines[$count]['up'] = 1;
byjoak0, September 24, 2010
All parameter are specified but it does not attempt to connect:

# ./check_asterisk_pri -H pbxserver -u someuser -p somesecret
Host, Username and Password are required.