Re: [Nagios-devel] Nagios 3.0 does not pass backslashes with
Posted: Fri Apr 04, 2008 12:51 am
[email protected] 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 [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> 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 [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]