Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Inspired By Jason's plugin http://exchange.nagios.org/directory/Plugins/Telephony/Asterisk/check_asterisk_ami/details 2 news features : - checkpeer Know the state of a specific peer (to see the state of a peer and not see all the peer trunks and phones ). - g729 supervision of the use and the availability of channels with the g729 codec (Licences use).
Current Version
1.0.0.1
Last Release Date
2012-10-24
Owner
said
Website
http://www.keysource.be
License
GPL
Compatible With
Inspired By Jason's plugin
http://exchange.nagios.org/directory/Plugins/Telephony/Asterisk/check_asterisk_ami/details
Here is a adaptation of the check_asterisk_ami script with two new features
- checkpeer Know the state of a specific peer (to see the state of a peer and not see all the peer trunks and phones ). The use of this functionality needs an additional argument which is "–n " Followed by the name of the peer you wan't to monitor. There is no use for the -w and the -c argument when using "checkpeer"
- g729 supervision of the use and the availability of channels with the g729 codec (Licences use). The critical value of the number of channels is definied by the script who queries the Asterisk server to know the number of availible licences If no value is defined for the –w argument the default value will be the number of availible licences – 1.
For both features , if the -u and the -p values are empty, it replaces the empty field by default Asterisk servers AMI access's (Admin amp111).
That's nice check, but I have issues with channel check and g729. That's diff of fix if needed: 135c135 CHANNELS=`/bin/echo -e "Action: loginrnUsername: ${AMIUSER}rnSecret: ${AMIPASS}rnEvents: offrnrnAction: Commandrncommand: Core Show ChannelsrnrnAction: Logoffrnrn" | /bin/netcat ${REMOTEHOST} ${AMIPORT} | awk '/active channels/ {print $1}'|tr -d "r"` 294c294 MAXLICTEST=`/bin/echo -e "Action: loginrnUsername: ${AMIUSER}rnSecret: ${AMIPASS}rnEvents: offrnrnAction: Commandrncommand: show g729rnrnAction: Logoffrnrn" | /bin/netcat ${REMOTEHOST} ${AMIPORT} | awk '/encoders/ {print $4}'` 302c302 ONUSE=`/bin/echo -e "Action: loginrnUsername: ${AMIUSER}rnSecret: ${AMIPASS}rnEvents: offrnrnAction: Commandrncommand: show g729rnrnAction: Logoffrnrn" | /bin/netcat ${REMOTEHOST} ${AMIPORT} | awk '/encoders/ {print substr($1, 1, match($1, "/") -1)}'`
You must be logged in to submit a review.
To:
From: