Nagios 3.0 does not pass backslashes with check_nrpe?

Andreas Ericsson ae at op5.se
Fri Apr 4 10:51:52 CEST 2008


kemmerc at pt.lu wrote:
> Hi all,
> 
> after upgrading to Nagios 3.0 it seems that backslashes  are no longer  
> passed to nrpe clients. The TESTHOST is running nsclient++.
> 
> When i do (as user nagios):
> 
> ./check_nrpe -H TESTHOST -n -p 5666 -c CheckFileSize -a  
> File=c:\\temp\\*.* MaxWarn=150M MaxCrit=200M
> 
> i get this:
> 
> OK all file sizes are within bounds.|'c:\temp\*.*'=127.51M;150;200;
> 
> which is the correct result.
> 
> 
> When Nagios is performing the same check, the result is:
> 
> Status information: OK: c:temp*.*: 0B
> Performance Data: 'c:temp*.*'=0B;104857600;209715200;
> 
> which is obviously not correct (as the backslashes are missing)
> 
> Can anyone confirm this problem?
> 

Yes. This is because both nagios and nrpe need to invoke a shell
to run the command. When you're giving arguments to nrpe you need
to double-escape them so the command the nrpe daemon sees is the
one with double backslashes (that is, use 4 backslashes in the
nagios config).

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace




More information about the Developers mailing list