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.
Wnt2bsleepin
Posts: 21 Joined: Wed Sep 18, 2013 3:22 pm
Post
by Wnt2bsleepin » Mon Jan 20, 2014 8:21 pm
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.
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?
lmiltchev
Former Nagios Staff
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Tue Jan 21, 2014 2:27 pm
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!
tmcdonald
Posts: 9117 Joined: Mon Sep 23, 2013 8:40 am
Post
by tmcdonald » Sun Jan 26, 2014 10:06 pm
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