Hi all
I am running this against on the Nagios server
[root@pbur2mon1 libexec]# ./check_nrpe -H 10.67.30.1 -c check_disk -a 10 20 /var
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
This is what I am seeing in the logs on the NRPE client
Aug 29 10:38:12 sbur2a1 nrpe[20991]: Error: Request contained command arguments!
Aug 29 10:38:12 sbur2a1 nrpe[20991]: Client request was invalid, bailing out...
This is what's in the nrpe.cfg
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
What am I doing wrong?
Thanks in advance
Failing to execute check_disk on NRPE client
Re: Failing to execute check_disk on NRPE client
I noticed that allow command arguments was set to 0, so I set it to 1
How can I tell if the client was compiled using command-arguments flag?
How can I tell if the client was compiled using command-arguments flag?
Re: Failing to execute check_disk on NRPE client
From the nrpe.cfg:
Did you compile with support for commands and set dont_blame_nrpe to 1?
Edit: Replied right after your second post.
If you installed nrpe using yum or something, it doesn't have support for commands. You need to compile it from source as per this article:
http://www.thegeekstuff.com/2010/12/ena ... arguments/
Code: Select all
# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.
Edit: Replied right after your second post.
If you installed nrpe using yum or something, it doesn't have support for commands. You need to compile it from source as per this article:
http://www.thegeekstuff.com/2010/12/ena ... arguments/
Former Nagios employee
Re: Failing to execute check_disk on NRPE client
Client was already there, nrpe conf didn't have the don't_blame_nrpe set to 1, so I set it.
After that I am still getting the same error when executing the remote command.
After that I am still getting the same error when executing the remote command.
Re: Failing to execute check_disk on NRPE client
NRPE will need to be uninstalled and re-compiled from source with --enable-command-args according to the doc I posted. It was likely installed with yum, so try "yum remove nrpe" to uninstall.
Former Nagios employee
Re: Failing to execute check_disk on NRPE client
Thanks, that did the trick
[root@pbur2mon1 libexec]# ./check_nrpe -H 10.67.30.1 -c check_disk -a 10 20 '/var /'
DISK OK - free space: /var 9106 MB (96% inode=99%); / 5357 MB (56% inode=94%);| /var=300MB;9909;9899;0;9919 /=4049MB;9909;9899;0;9919
[root@pbur2mon1 libexec]# ./check_nrpe -H 10.67.30.1 -c check_disk -a 10 20 '/var /'
DISK OK - free space: /var 9106 MB (96% inode=99%); / 5357 MB (56% inode=94%);| /var=300MB;9909;9899;0;9919 /=4049MB;9909;9899;0;9919
Re: Failing to execute check_disk on NRPE client
Half hour to resolve, not bad
I'll be closing this thread now, but feel free to open another if you need anything in the future!
I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee