Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_peer_status - Check Asterisk SIP/IAX Peer Status
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Then it Returns the Status (OK, Lagged, Unreachble or Unknown) with a proper Sig code (ok, warning, critical, unknown).
* Contact me if you need help: a.zorzetto AT gmail DOT com *
USAGE: Check_peer_status [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-u USER, --username=USER
username for AMI.
-s SECRET, --secret=SECRET
password for AMI.
-H HOSTNAME, --host=HOSTNAME
the host to connect to. The default is localhost.
-P PORT, --port=PORT the port to contact. Default is 5038.
-t TYPE, --type=TYPE sip or iax are allowed values.
-p PEER, --peer=PEER the peer name to check.
-a, --all print the whole output.
-v, --verbose print the whole output.
EXAMPLES:
to check an IAX peer:
$PATH/check_peer_status -H ip_asterisk -u username -s secret -t iax -p peername
to check an SIP peer:
$PATH/check_peer_status -H ip_asterisk -u username -s secret -t sip -p peername
to list all peers
$PATH/check_peer_status -H ip_asterisk -u username -s secret -t iax -a
$PATH/check_peer_status -H ip_asterisk -u username -s secret -t sip -a
CHANGELOG:
- 0.2.2 it can monitor the unknown status of the peers, generally when a peer is configured but never connected
Reviews (6)
It seems that by default the socket will not timeout if the PBX is unreachable or the Manager permissions are incorrect. Add something like this, before the line starting mysocket=. The number is in seconds:
socket.setdefaulttimeout(30)
...
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Returning performance data would be nice as well but given the plugin is clearly written that is not too hard to add in yourself. Good stuff - thank you.
socket.setdefaulttimeout(30)
...
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Returning performance data would be nice as well but given the plugin is clearly written that is not too hard to add in yourself. Good stuff - thank you.
bymaticue, January 7, 2015
I dont know what to do at manager.conf to accept connections from the nrpe agent on the localhost.
Could you help me ?
Could you help me ?
Owner's reply
You can try something like this:
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
webenabled = no
[username]
secret = password
deny=0.0.0.0/0.0.0.0
permit=192.168.1.0/255.255.255.0 #the network address where the nagios server is
read = system,call,log,verbose,command,agent,user,originate
bykarl67l, June 25, 2014
A little of time to understand how to use it to discover that all has been weel explained in the description.
OK for me
OK for me
bystuartb, June 25, 2014
In a few minutes I configured my Asterisk manager and got my trunks monitored on my the Nagios instance of my company.
I big thank you Andrea
I big thank you Andrea
Critical - Cannot contact Asterisk! and all
Owner's reply
You have to configure your manager.conf to accept connections from the nrpe agent on the localhost