NRPE with command arguments

Ludse Verhoeven ludse.verhoeven at vopak.com
Wed May 19 11:13:37 CEST 2010


Hi there,

Your final command to invoke check_disk is 
"check_nrpe!check_disk!$_HOSTDISKWARNING$!$_HOSTDISKCRITICAL$". Passing 
this to check_nrpe will only get check_disk as an argument passed through 
to nrpe (since your check_nrpe-command is "$USER1$/check_nrpe -H 
$HOSTADDRESS$ -p $_HOSTNRPE_PORT$ -c $ARG1$"). This in turn starts the 
check_disk-command via NRPE without any arguments (because 
'_HOSTDISKWARNING' and '_HOSTDISKCRITICAL' will get passed as ARG2 and 
ARG3 to check_nrpe) and in the end will cause check_disk only see a -w and 
-c option without thresholds.

I think what needs to be done is pass the whole command with escaped 
bang-characters to check_nrpe like this:
check_nrpe!check_disk\!$_HOSTDISKWARNING$\!$_HOSTDISKCRITICAL$
or maybe even enclose it in single or double quotes so it gets passed 
through as 1 argument to check_nrpe.....

Not sure if this works like it is supposed to (haven't tested it myself), 
but qua syntax this seems more correct.

HTH

Met vriendelijke groet/with kind regards,
          Ludse Verhoeven
 
AIX System Engineer
T: +31 10 400 2440
F: +31 10 400 2891
E: ludse.verhoeven at vopak.com


Visit / Postal Address: 

http://www.vopak.com






Enrico Zimol <lomiz.mail at gmail.com> 
19/05/2010 10:43
Please respond to
Nagios Users List <nagios-users at lists.sourceforge.net>


To
Nagios Users List <nagios-users at lists.sourceforge.net>
cc

Subject
Re: [Nagios-users] NRPE with command arguments






>after that - change the testing to work the way you want it

Hello, i'm testing that but I can't understand what is wrong on my
configurations.
(blame_nrpe e ricompiling it's ok)
On nrpe.cfg I defined this command:
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c 
$ARG2$


And on nagios server I've this definitions:
http://pastebin.com/7uZRcMk9

Also enabling debug on nrpe deamon I see nothing during the command on 
messages:
May 19 08:21:54 blabla xinetd[24320]: START: nrpe pid=24336 
from=192.168.234.234
May 19 08:21:54 blabla nrpe[24336]: INFO: SSL/TLS initialized. All
network traffic will be encrypted.
May 19 08:21:54 blabla xinetd[24320]: EXIT: nrpe status=0 pid=24336
duration=0(sec)


Any suggest or documentation?

Thank's!

------------------------------------------------------------------------------

_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100519/9a7d5ff0/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------

-------------- next part --------------
_______________________________________________
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