Error with using NRPE with Icinga2

icinga

I have working instance of Nagios, and I would like to run Icinga2 on other machine. Nagios is using NRPE so I would like to use it too.

I have following configuration in files:

object Service "NRPE check load" {
    import "generic-service"
    host_name = "agrippina"
    check_command = "nrpe-check-2arg"
    vars.host = "agrippina.domain.net"
    vars.check = "check_load"
    vars.loads = "'10' '20'"
    }

and

object CheckCommand "nrpe-check-2arg" {
    import "plugin-check-command"
    command = [PluginDir + "/check_nrpe" ]
    arguments = {
    "-H" = "$host$"
    "-c" = "$check$"
    "-a" = "$loads$"
    }
}

When I'm issuing command by hand:

/usr/lib/nagios/plugins/check_nrpe -H agrippina.domain.net -c 'check_load' -a '10' '20'

I receive

OK – load average: 0.98, 1.39, 3.79|load1=0.980;10.000;20.000;0;
load5=1.390;10.000;20.000;0; load15=3.790;10.000;20.000;0;

Icinga2 logs:

CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for error messages.

Where should I look for that messages?

Since when I run this check by hand and it works, how to fix it in Icinga2?

Best Answer

Change vars.loads = "'10' '20'" to vars.loads = "10!20" because NRPE is not able to read the arguments the way you have declared them in object Service.