Page 1 of 1

NRPE Arguments

Posted: Wed Sep 06, 2017 11:45 am
by Cristhian_Plaza
When I send arguments to NRPE, I got this answer "CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)."

Command

Code: Select all

define command {
        command_name    check_xvda1
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_xvda1" -a $ARG2$ $ARG3$ $ARG4$
}
Service

Code: Select all

define service {
        use                     generic-service
        host_name               Wikinovum
        service_description     Disco /dev/xvda1
        check_command           check_xvda1!20%!10%!/dev/xvda1
}
On remote machine

Code: Select all

command[check_xvda1]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$

Re: NRPE Arguments

Posted: Wed Sep 06, 2017 12:41 pm
by scottwilkerson
Change the command to the following

Code: Select all

define command {
        command_name    check_xvda1
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_xvda1" -a '$ARG1$ $ARG2$ $ARG3$'
}
Then restart nagios

Code: Select all

service nagios restart