0

I am very new to icinga. In fact I finished setting it up today.

I am trying to monitor a bunch of stuff on my nrpe machines. I set up my services in /etc/icinga/objects/my.server.com.cfg and configured it like so:

define host{
        use                     generic-host   
        host_name               my.server.com
        alias                   my.server.com
        address                 123.45.678.999
        }

define service{
        use                             generic-service
        host_name                       my.server.com
        service_description             Total Processes
        check_command                   check_procs!250!400
        }

When looking in the admin interface I was wondering why all servers are having the same amount of processes active, but after checking the command icinga executes, I realized that all commands are being executes on the icinga server itself rather than the nrpe machine.

Where is my mistake? nrpe.cfg is set up correctly to whitelist my icinga server. Telnet connection works fine.

1 Answer 1

2

https://wiki.icinga.org/display/howtos/Setting+up+NRPE+with+Icinga has the details, but you need to set up a proxy command. Something similar to:

define command {
    command_name check_nrpe_command
    command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}

Once you have that, you can set up your remote commands:

define service {
     [stuff]
     check_command check_nrpe_command!check_procs!250!400
     [more stuff]
 }

What it does is builds a local check that calls the local NRPE checker to query the remote system.

2
  • I found that there is a ubuntu package which adds a check_nrpe command, which seems to do exactly the same thing. But while this is working, the argument array is not getting created correctly. The third passed argument, $ARG3$, simply gets ignored instead of appending to the -a list, resulting in a lot of undefined commands. Thoughts?
    – patchrail
    Jul 21, 2014 at 6:03
  • Forget a commend. I took some time to debug and see how icinga / nagios passes / parses arguments and figured to just replace the ! after check_nrpe with spaces for argument separation. (Since it's getting passed through -a). NRPE working now
    – patchrail
    Jul 21, 2014 at 6:47

You must log in to answer this question.

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