0

I'm using the nagios check_load plugin.

I have the following line in my /etc/nagios/nrpe.cfg

command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$

And on my icinga server in /etc/icinga/objects/localhost_icinga.cfg I have the following service definition

define service{
        use                             generic-service
        host_name                       prod-01
        service_description             Prod Load
        check_command                   check_nrpe!check_load!15,10,5!30,25,20
}

When I check my icinga dashboard it lists this check as a pink colored, unknown error. Is there anything I need to change in my configuration to get everything to work correctly?

1
  • What is the definition of the "check_nrpe" command? Oct 30, 2013 at 18:30

3 Answers 3

0

Try running the command on the server with the same arguments and see if it responds. it will tell you the error or if it's an unknown error chances are you just need to either enable sudo with no password for user nagios OR chmod 4755 and ownership root:nagios the check script.

5
  • I ran /usr/lib/nagios/plugins/check_nrpe -H <client ip> -c check_load -a 15,10,5 30,25,20 and the output was fine.
    – user784637
    Oct 29, 2013 at 20:06
  • I meant on the server in question ssh to it and run /usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 as a regular user and see if it errors.
    – art3mis
    Oct 29, 2013 at 20:37
  • I tried that as well and it worked
    – user784637
    Oct 29, 2013 at 20:48
  • "enable sudo with no password for user nagios" is potentially very dangerous advice
    – Keith
    Nov 7, 2013 at 19:54
  • i'd have to agree keith, i usually forget that most don't read the config file where it says to include the path to the checkdir
    – art3mis
    Nov 18, 2013 at 19:50
0

In nrpe.cfg on your target system, is dont_blame_nrpe set to 1?

What do the logs on your Icinga server say?

0

Your check_command is slightly wrong. You have check_nrpe!check_load!15,10,5!30,25,20, which is passing "15,10,5" as ARG2 and "30,15,20" as ARG3, but your command is written to only use ARG2.

You can just change check_nrpe!check_load!15,10,5!30,25,20 to check_nrpe!check_load!"15,10,5 30,25,20" (or change your command[check_load] line to use both ARG2 and ARG3).

You must log in to answer this question.

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