Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289722 - net-analyzer/nagios-nrpe USE flag "command-args" is useless
Summary: net-analyzer/nagios-nrpe USE flag "command-args" is useless
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 13:59 UTC by Marcin Mirosław
Modified: 2010-11-04 20:11 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,4.50 KB, text/plain)
2009-10-19 14:03 UTC, Marcin Mirosław
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2009-10-19 13:59:07 UTC
Quotation from /usr/share/doc/nagios-nrpe-2.12-r102/SECURITY :
"ENABLING ARGUMENTS
------------------

To enable support for command argument in the daemon, you must
do two things:

   1.  Run the configure script with the --enable-command-args
       option

   2.  Set the 'dont_blame_nrpe' directive in the NRPE config
       file to 1.
"

Now, let's emerge nagios-nrpe: 
FEATURES="keeptemp" USE="-command-args" emerge -av1 nagios-nrpe
[snip]
# grep command-args /var/tmp/portage/net-analyzer/nagios-nrpe-2.12-r102/temp/build.log
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-ssl --disable-command-args --host=i686-pc-linux-gnu --prefix=/usr --libexecdir=/usr/lib/nagios/plugins --localstatedir=/var/nagios --sysconfdir=/etc/nagios --with-nrpe-user=nagios --with-nrpe-grp=nagios

As we can see, aplication was configured without command-args.
Edit /etc/nagios/nrpe.cfg and change: 
dont_blame_nrpe=0 to dont_blame_nrpe=1
and let's add line:
 command[check_test]=/bin/echo " -w $ARG1$ -c $ARG2$ -s $ARG3$"

Starting nrpe daemon:
# /etc/init.d/nrpe start

And now i'm checking nrpe via check_nrpe:
# /usr/lib/nagios/plugins/check_nrpe -H 127.00.0.1 -c check_test -a FOO BAR TEST
 -w FOO -c BAR -s TEST
#

It's no matter if nrpe is compiled with or without command-args, this is always enabled. 

Reproducible: Always
Comment 1 Marcin Mirosław 2009-10-19 14:03:46 UTC
Created attachment 207552 [details]
emerge --info
Comment 2 Marcin Mirosław 2010-10-19 13:23:12 UTC
Ping, first birthday of bug, without any answer :/
Comment 3 Tobias Scherbaum (RETIRED) gentoo-dev 2010-10-19 17:43:06 UTC
i'll take a look at it within the next few days ..
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2010-10-31 15:49:13 UTC
(In reply to comment #3)
> i'll take a look at it within the next few days ..
> 

Verified. Removed the command-args use-flag in -r104.
Comment 5 roltel 2010-11-01 16:25:49 UTC
I am having problems with net-analyzer/nagios-nrpe-2.12-r104. I noticed the use flag "command-args" has been removed. After updating to the new version and restarting the nrpe service, I am getting the following errors:

nrpe[2472]: Error: Request contained command arguments!
nrpe[2472]: Client request was invalid, bailing out...

Did you only test locally (check_nrpe -H 127.00.0.1 ...) or did you actually connect from a remote nagios host through port 5666 ? I think this will make a huge difference.

So please reenable the use flag "command-args"!!!
Comment 6 Tobias Scherbaum (RETIRED) gentoo-dev 2010-11-01 17:28:06 UTC
(In reply to comment #5)
> Did you only test locally (check_nrpe -H 127.00.0.1 ...) 

Obviously :/ Lemme re-check tomorrow.
Comment 7 Marcel Pennewiß 2010-11-01 22:03:18 UTC
(In reply to comment #5)
> I am having problems with net-analyzer/nagios-nrpe-2.12-r104. I noticed the use
> flag "command-args" has been removed. After updating to the new version and
> restarting the nrpe service, I am getting the following errors:

Same here.

nrpe.cfg says:
# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments to commands that are executed.  This option only works
# if the daemon was configured with the --enable-command-args configure script
# option.

So please readd useflag to allow arguments for nrpe ;)
Comment 8 Marcin Mirosław 2010-11-01 22:33:47 UTC
It looks that I unwitting made muddle. I'm sorry for it.
Comment 9 Tobias Scherbaum (RETIRED) gentoo-dev 2010-11-04 20:11:25 UTC
-r104 removed and -r103 restored.