Asterisk

Asterisk PRI Status

Description:

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).

Current Version

Last Release Date

June 18, 2009

Compatible With


Project Notes
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) Add a Review
Not wokring
by iBrewBeer, May 31, 2014

Getting same thing as above commenter. It's not doing anything.



PHP5 Modification
by los, January 31, 2014

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.



Works great for me
by socain, March 31, 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;



Do not work
by joak0, September 30, 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.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
3.8 (6)
Favorites
0
Views
104,275