Multi Response Support Added to Nagios Plugin

We have made updates to the Nagios SIP Plugin for Ruby.

Find it on Github

New OK status

The plugin returns 0 value in a new case:

  • -c is set to a list of values (i.e. “100,200”) the server replies to the last code.

It prints to stdout a string to be parsed by Nagios:

OK:status code = 100,200

New Debug Flag

The plugin now provides full response information when given a debug flag:

~$ ./nagios-sip-plugin.rb --help

Usage mode: nagios-sip-plugin.rb [OPTIONS]

OPTIONS:
# Other options...

-D : Full response debug Information (default false).

Homepage:
https://github.com/ibc/nagios-sip-plugin

Example Debug Information

-- Debug Information:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.137;rport;branch=z9hG4bKkhhnun7h
Max-Forwards: 5
To: <sip:phone###@website.com:5060>
From: <sip:nagios@website.com>;tag=fzcxhmjf
Call-ID: eh8k1wkcmt@192.168.1.137
CSeq: 421 INVITE
RouteNGNClient-Version: 1.0.9
SIPRedirector-Version: 0.9.92
Content-Length: 0

SIP/2.0 300 Multiple Choices
Via: SIP/2.0/UDP 192.168.1.137;rport;branch=z9hG4bKkhhnun7h
Max-Forwards: 5
To: <sip:phone###@website.com:5060>
From: <sip:nagios@website.com>;tag=fzcxhmjf
Call-ID: eh8k1wkcmt@192.168.1.137
CSeq: 421 INVITE
RouteNGNClient-Version: 1.0.9
SIPRedirector-Version: 0.9.92
Contact: <sip:phone###@9.9.9.9:5060>
Content-Length: 0