Page 1 of 1

How to add existing plugin as a service

Posted: Thu Jul 20, 2017 10:09 am
by chillipepper
I am trying to add check_sip plugin to add as a service check for our IPBX and sip trunk monitoring. When i run check_sip with the strings ./check_sip -u sip:1509@xxxxxx -H xxxxx -p 5060 -w 2 i always receive SIP timeout: No response from SIP server after 15 seconds is there something a miss here. If the check sip string passes how would a command be structured to add this a service would "$USER1$/check_sip -u $sip:[email protected]$ -H $HOSTADDRESS$ -P $ARG1$" work?

Re: How to add existing plugin as a service

Posted: Thu Jul 20, 2017 10:55 am
by mcapra
chillipepper wrote:When i run check_sip with the strings ./check_sip -u sip:1509@xxxxxx -H xxxxx -p 5060 -w 2 i always receive SIP timeout: No response from SIP server after 15 seconds is there something a miss here.
I assume this is the plugin you're using?
https://exchange.nagios.org/directory/P ... ip/details

The error message SIP timeout: No response from SIP server after $TIMEOUT seconds means that the socket connection this plugin attempts to make has timed out. Hard to say why that happened specifically, though. May need to do some nmap and tcpdump based investigation to check the network between your Nagios XI machine and the remote device.
chillipepper wrote:If the check sip string passes how would a command be structured to add this a service would "$USER1$/check_sip -u $sip:[email protected]$ -H $HOSTADDRESS$ -P $ARG1$" work?
Depends on a few different things. You always need to be mindful of Bash reserved characters when making command definitions or setting service/host's check_command parameter. I assume $sip:[email protected]$ is intended to be a Nagios macro?

This documentation has some insights:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: How to add existing plugin as a service

Posted: Thu Jul 20, 2017 4:36 pm
by dwhitfield
@mcapra is right, per usual!

As far as the nmap testing, you could tell us a bit more about your sip setup? Is the sip running on a Linux server, or something else? If so, what version? That will help us get you the appropriate commands.