testing from nagios server itself

Marc Powell marc at ena.com
Thu Jul 30 14:32:58 CEST 2009


On Jul 30, 2009, at 12:27 AM, Thomas Kinghorn - MWEB wrote:

> Many thanks for the reply
>
> The plugin is from http://exchange.nagios.org/directory/Plugins/Network-Protocols/*-VoIP/SIP/check_sip-sipsak/details
>
> Just renamed to check_sipsak as check_sip is already in use

Thanks, that's very helpful.

> Running the command via CLI as the nagios user gives the desired  
> results, so I am unsure
> As to how environmental variables would affect the output.

When nagios runs a plugin, the environment is significantly reduced  
for security. Things like $PATH and other variables are not the same  
as when executed from a shell.

> Yes, the error posted is the returned result, not creative  
> editing..;o)

This plugin is just a wrapper for the 'sipsak' command. I see in the  
code that it should be including a subset of the output from the  
sipsak command where it's printing (...<some sipsak output>). It  
appears that the sipsak command isn't running correctly.

> I will post should I find a solution.

A couple pointers --

- the plugin accepts multiple -v arguments for verbose output. Add 2  
to the end of your command_line and capture the output to a file: '-v - 
v -v >/tmp/log.err 2>&1'
- In the code, the path to sipsak isn't specified. If this is not  
located in /bin or /sbin, it probably isn't being found. Try changing --

	  @Sipsak_Cmd = qw(sipsak --nagios-code -v);
	to
	  @Sipsak_Cmd = qw(/path/to/sipsak --nagios-code -v);

--
Marc


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list