Telephony/SIP Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Telephony/SIP Monitoring

Post by gshergill »

Hi Nagios Support,

I was wondering about call plugins.
I have found two plugins so far;

check_sip
check_calls

Basically, we want to have a script that attempts a call every morning, then lets us know if it doesn't work.

check_calls seemed great for this - but it returns OK even if the recipient phone is disconnected.

check_sip I'm not sure what it outputs, but I haven't been able to get it working (keeps returning invalid extension error).

I was wondering if there are any other plugins around for Nagios which makes a call.

Thank you.

Kind Regards,

Gary Shergill
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Telephony/SIP Monitoring

Post by slansing »

As far as the check_sip plugin goes in regards to your error please see this:

http://forums.meulie.net/viewtopic.php?t=3684
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Telephony/SIP Monitoring

Post by gshergill »

Hi slansing,

Thank you for the link. I made the change as mentioned in the post but the same error persists.

I think I may be using the "-u" incorrectly, I am currently running;

check_sip -u sip:(extension)@(ip of registrar) -H (ip of registrar) -p (port of registrar) -w 10

e.g.
check_sip -u sip:[email protected] -H 192.168.1.0 -p 5060 -w 10

Is there maybe a mistake here? check_calls requires the same format for it's FROM/TO as the -u argument on check_sip, so I've used the same details (the calls is made on check_calls).

Thank you.

Kind Regards,

Gary Shergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Telephony/SIP Monitoring

Post by scottwilkerson »

I'm not positive, but you may need to wrap that in single quotes

Code: Select all

check_sip -u 'sip:[email protected]' -H 192.168.1.0 -p 5060 -w 10
What is it returning?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Telephony/SIP Monitoring

Post by gshergill »

Hi scottwilkerson,

Code: Select all

./check_sip -u "sip:[email protected]" -H 192.168.3.7 -p 5060 -w 10
Invalid Extension
This was run from both the Nagios machine and the server 192.168.3.7 (which has the nagios plugins installed - currently uses NRPE for monitoring) and has the same error on both.

Thank you.

Kind Regards,

Gary Shergill
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Telephony/SIP Monitoring

Post by slansing »

Quoting directly from the thread posted above on Meulie:
I found my problem. I originally suspected that it was a permissions problem; however, I did execute the command as my nagios user prior to submitting this thread.

Upon further investigation, I concluded that the nagios user did not have the utils.pm in it's include path. When I logged in and ran the command as my nagios user, I happened to have already changed into my plugins directory, so it ran it from there. I added the location of this file to my include path, and it now works fine.

This appears to have solved both problems
Have you made sure to check this?
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Telephony/SIP Monitoring

Post by gshergill »

Hi slansing,

I checked the permissions and they seem to be fine.

I also checked running as a nagios user and the extension problem is still there.
I have another plugin on the server which uses utils.pm as well and that runs with no issues so I don't think it would be on that side.

How can I check that the location of the utils.pm is in the include path?

Thank you.

Kind Regards,

Gary Shergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Telephony/SIP Monitoring

Post by scottwilkerson »

This may sound like an obvious question but you do in fact have an extension 6004 on this server correct?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Telephony/SIP Monitoring

Post by gshergill »

Hi scottwilkerson,

Yes the extension definitely exists. I can use 6004 on the check_calls plugin and it successfully dials out using that extension.

Kind Regards,

Gary Shergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Telephony/SIP Monitoring

Post by scottwilkerson »

I was just looking at this again
http://exchange.nagios.org/directory/Pl ... ip/details

and it looks like the URI is -U not -u

so lets try

Code: Select all

./check_sip -U "sip:[email protected]" -H 192.168.3.7 -p 5060 -w 10
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked