0

I have upgraded a server from Debian 8 to Debian 9. The server was running Nagios 3 to do some checks but that has been discontinued. The natural replacement is Icinga (version 1).

I've installed it and copied and adjusted the configuration files. Most of it worked directly but the NRPE remote checks are not working.

First of all I was using the check_nrpe_1arg command but that seems to have been changed to check_nrpe to make it clear it doesn't accept arguments (the only argment is the remote command name).

That fixed the configuration for icinga to start. But all the NRPE checks are in unknown state with this message:

CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).

I've ran the command from the bash prompt to check if it was working correctly and it seems so.

$ /usr/lib/nagios/plugins/check_nrpe -H 192.168.4.1 -c check_users
USERS OK - 0 users currently logged in |users=0;5;10;0

But somehow from Icinga the command is not working.

1 Answer 1

0

Well, I have found the problem.

I was using SSL from the command line but not from the Icinga configuration. I confused the executable check_nrpe with the command definition of the same name.

This is the NRPE configuration from version 3 (the one shipped with Debian 9):

# this command runs a program $ARG1$ with no arguments and disables SSL support
define command {
        command_name    check_nrpe
        command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -n
}

# this command runs a program $ARG1$ with no arguments and enables SSL support
define command {
        command_name    check_nrpe_ssl
        command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

Notice the -n parameter on the first one. I translated all the all Nagios 3 usages of check_nrpe_1arg with check_nrpe but it should be check_nrpe_ssl.

I did that and now it works.

1
  • 1
    nrpe v3 also changed the packet size, which renders nsclient++ pretty unusable, jfyi.
    – dnsmichi
    Aug 9, 2017 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .