check_nrpe passing wrong arguments?

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
Wnt2bsleepin
Posts: 21
Joined: Wed Sep 18, 2013 3:22 pm

check_nrpe passing wrong arguments?

Post by Wnt2bsleepin »

Hello,

I have a service check for my machine that checks the disk usage. However, in the log file the arguments seem to be messed up.

Log:

Code: Select all

Running command: /usr/local/nagios/libexec/check_disk -w 20 10 /home -c  -p

Here is my local config file for it.

Code: Select all

check_nrpe!check_disk!20!10!/home


and here is the local NRPE command definition

Code: Select all

command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a "$ARG2$ $ARG3$ $ARG4$"

Here is the remote command configuration

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$

Am I missing something?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_nrpe passing wrong arguments?

Post by lmiltchev »

I believe you need to have the "check_nrpe" command defined as such:

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c $ARG1$ $ARG2$
your check on the remote box:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
your check on the nagios box:

Code: Select all

check_nrpe!check_disk!-a '-w 20% -c 10% -p /home'
Test it from the command line:

Code: Select all

./check_nrpe -H <client ip> -c check_disk -a '-w 20% -c 10% -p /home'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Wnt2bsleepin
Posts: 21
Joined: Wed Sep 18, 2013 3:22 pm

Re: check_nrpe passing wrong arguments?

Post by Wnt2bsleepin »

That did it. Thank you very much.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_nrpe passing wrong arguments?

Post by tmcdonald »

Nice to see a quick fix. I'll be locking this up now. If you have any other issues please feel free to open up another thread.
Former Nagios employee
Locked