[Nagiosplug-help] check_nrpe idea

Arnold Cano arnoldc at mcmservice.com
Wed Apr 28 13:54:03 CEST 2004


Hi Jason,

You are correct... you can enclose the -a arguments in double quotes,
however, I'm using nrpe on one host behind a firewall to forward nrpe
requests to other machines behind the firewall (indirect checks). This
means I have to chain check_nrpe requests like so...

checkcommands.cfg:
define command {
  command_name  indirect_check_nrpe
  command_line  $USER1$/check_nrpe -H $ARG1$ -c $ARG2$ -a $HOSTADDRESS$
$ARG3$
}

services.cfg:
define service {
  ...
  check_command
indirect_check_nrpe!<ip_of_first_machine>!check_nrpe!cpuload_nrpe_nt "50
80"
}

nrpe.cfg:
command[check_nrpe]=<path_to_nrpe>/check_nrpe -H $ARG1 -c $ARG2$ -a
$ARG3$

The problem I find is when check_nrpe tries to forward the request with
-a arguments that contain spaces like so...

services.cfg
define service {
  ...
  check_command
indirect_check_nrpe!<ip_of_first_machine>!check_nrpe!service_nrpe_nt
"Event Log"
}

Debugging on the client side shows that the only thing the client nrpe
gets is "Event" in stead of "Event Log". I've even tried adding
additional double quotes, escaped quotes, etc with no luck.

Granted, there may be a better way to handle this altogether but this is
the simplest form I could come up with. This is why I think having a
configurable -a command separator may help.

Arnold

On Wed, 2004-04-28 at 15:28, Jason Martin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I bleve you can enclose a given argument to -a in quotes to prevent it 
> from being split.
> 
> - -Jason Martin
> On Wed, 28 Apr 2004, Arnold Cano wrote:
> 
> > Would anyone else think adding an option to configure what the separator
> > character should be when using the "-a <arglist...>" option?
> > 
> > The problem I am trying to deal with occurs when I have a argument that
> > already contains spaces (such as a windows service name). I know I could
> > just create a command declaration in the nrpe.cfg for each one but for
> > the sake of maintenance I am using command arguments. This means my
> > commands in nrpe.cfg are simplified to one command as so...
> > 
> > command[check_nrpe]=<path_to_nrpe>/check_nrpe -H $ARG1$ -c $ARG2$ -a
> > $ARG3$
> > 
> > Arnold
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: Oracle 10g
> > Get certified on the hottest thing ever to hit the market... Oracle 10g. 
> > Take an Oracle 10g class now, and we'll give you the exam FREE.
> > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> > _______________________________________________
> > Nagiosplug-help mailing list
> > Nagiosplug-help at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> > ::: Please include plugins version (-v) and OS when reporting any issue. 
> > ::: Messages without supporting info will risk being sent to /dev/null
> > 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.3.5 (GNU/Linux)
> Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/
> 
> iD4DBQFAkBPdl2ODWuqVSBMRAtqyAJjrcmcH7/uqw276POmvf2Sa0PZAAJ42ZgTA
> sJ7j1n1n7hHWvfLVjeI+Qg==
> =acFX
> -----END PGP SIGNATURE-----
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g. 
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 





More information about the Help mailing list