I want to monitor disk-usage on client1 using nrpe.
On client1 I have the following lines in nrpe.conf
dont_blame_nrpe=1
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
I don’t want to use hardcode arguments
on the server-site I create the following command definition
‘check_nrpe’ command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$
}
And also a service:
check_command check_nrpe!check_disk!20%!10%!/
But it’s not working. I have the following message
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages
On client1 I see:
nrpe[24429]: Error: Request contained command arguments!
It works with hardcoded arguments.
How do I define the command and a service using user-supplied arguments