check_nrpe: option requires an argument on core 3.4.0

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bsfez
Posts: 23
Joined: Tue May 08, 2012 8:41 am

check_nrpe: option requires an argument on core 3.4.0

Post by bsfez »

Hi,

I successfully set up a Nagios 3.4.0 on squeeze and including remote monitoring of 2 servers.
They are communicate properly:
./check_nrpe -H remoteserverip -c check_users"
result is ok.

./check_nrpe -H remoteserverip -c check_load
OK - load average: 0.20, 0.17, 0.16|load1=0.200;15.000;30.000;0; load5=0.170;10.000;25.000;0; load15=0.160;5.000;20.000;0;

So far so good now i need to create the host configuration file so the command are performed automatically.
in remoteserverip.cfg i have the following:

Code: Select all

define host{
        use                     linux-server
        host_name          remoteservername
        alias                   remoteserverdescription
        address               remoteserverip
        }

define service{
        use                          generic-service
        host_name               remoteservername
        service_description  CPU Load
        check_command      check_nrpe!check_load
        }
When i look at the dashboard and get into the service it says :
remoteservername
CPU Load
UNKNOWN 05-14-2012 16:15:42 0d 0h 16m 27s 3/3 /usr/lib/nagios/plugins/check_nrpe: option requires an argument -- 'a'
I tried a lot of things while i read here and there but may be someone can post me a sample so i can create my server conf files in a way they work !

Bernard

PS : On my 3.2.1 the following Work but copying this into my 3.4.0 config file doesn't work and give me the following error :
Error: Service check command 'check_nrpe_1arg' specified in service 'CPU Load' for host 'remoteservername' not defined anywhere!

Code: Select all

define service{
        use                     generic-service
        host_name               remoteservername
        service_description     Current Load
        check_command           check_nrpe_1arg!check_load
}
PSS : on "/usr/local/nagios/etc/objects/commands.cfg" where it says "command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$" i have deleted "-a $ARG2$" i have a result that look correct, but of course i believe this is not the right way to do it. :)
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: check_nrpe: option requires an argument on core 3.4.0

Post by agriffin »

Nagios Core 3.4.0 has a known bug where the check breaks on correctly quoted object definitions. A fix was released in version 3.4.1.
bsfez
Posts: 23
Joined: Tue May 08, 2012 8:41 am

Re: check_nrpe: option requires an argument on core 3.4.0

Post by bsfez »

Well...

Upgrade check says :
Nagios Update Check
| Print | E-mail
Up To Date

Your installation of Nagios Core (3.4.0) is up-to-date, so no upgrade is required. The latest version of Nagios Core is 3.4.0 was released on 2012-05-04.
But let's continue to upgrade. I'm a little frustrated cause it will be the third time for me in 2 weeks. :(

Now that this is done, may be you have some experience with nrpe.
Can you just confirm that this is the right way to do ?

Code: Select all

define service{
        use                     generic-service
        host_name               remoteservername
        service_description     Current Load
        check_command           check_nrpe_1arg!check_load
}
Thanks
Bernard
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: check_nrpe: option requires an argument on core 3.4.0

Post by agriffin »

The update check usually takes a bit longer to see new versions. As for your definition: that's about right, yes.
bsfez
Posts: 23
Joined: Tue May 08, 2012 8:41 am

Re: check_nrpe: option requires an argument on core 3.4.0

Post by bsfez »

Upgrade to 3.4.1 is done, things seams better, but still no chance with nrpe anyway this require a new discussion.

Tks
Locked