Page 1 of 1

check_sip

Posted: Thu Sep 08, 2022 5:37 am
by gareth129349
Hi All,

I'm having a little trouble getting the check_sip plugin to work.

If I run the command from the terminal it works fine

Code: Select all

[root@nagios objects]# /usr/local/nagios/libexec/check_sip -u sip:user@server.com -H II.PP.AA.SS
SIP/2.0 200 OK, 3.555702 seconds response time, cnt=4|rtt=3.555702s;cnt=4;0.5s;1s;0:10; code=200
From the nagios check i see -
nagios.PNG
nagios.PNG (3.31 KiB) Viewed 400 times
My Config -

/usr/local/nagios/etc/objects/commands.cfg

Code: Select all

define command{
        command_name    check_sip
        command_line    $USER1$/check_sip -u $ARG1$ -H $HOSTADDRESS$ -w 5
        }
/usr/local/nagios/etc/objects/

Code: Select all

define service{
        use                             router-service         ; Name of service template to use
        host_name                       CallSwitch
        service_description             SIP CHECK MY SERVER
        check_command                   check_sip!sip:user@myserver.com!II.PP.AA.SS
        }
The os is cent os 7

Can anyone help?

Thanks

Re: check_sip

Posted: Fri Sep 09, 2022 9:10 am
by gareth129349
The code under /usr/local/nagios/etc/objects/commands.cfg was set to $HOSTADDRESS$ and needed changing to $ARG2$

Code: Select all

define command{
        command_name    check_sip
        command_line    $USER1$/check_sip -u $ARG1$ -H $ARG2$
        }
It's now working :)