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?

user784637
  • 1,482
  • 7
  • 35
  • 51

3 Answers3

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.

art3mis
  • 958
  • 8
  • 4
  • I ran `/usr/lib/nagios/plugins/check_nrpe -H -c check_load -a 15,10,5 30,25,20` and the output was fine. – user784637 Oct 29 '13 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 '13 at 20:37
  • I tried that as well and it worked – user784637 Oct 29 '13 at 20:48
  • "enable sudo with no password for user nagios" is potentially very dangerous advice – Keith Nov 07 '13 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 '13 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?

KJH
  • 372
  • 1
  • 14
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).

Keith
  • 4,627
  • 14
  • 25