Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
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
Owner
Nagios Exchange
Website
http://www.barryodonovan.com/index.php/2007/11/02/asterisk-pri-nagios
Compatible With
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
Getting same thing as above commenter. It's not doing anything.
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.
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;
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.
You must be logged in to submit a review.
To:
From: