NRPE not executing through web interface (Always Unknown)


#1

Okay, at the risk of being told to go away and read the docs again… :wink:

I have setup NRPE on my remote machine and checked that it works, the config file is all setup with the commands I wish to use along with the corresponding plugins.

I have set up my command definition as this on the Nagios host’s config file.

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

(Where $USER1$ is the path to the libexec directory)

I can execute a command via the NRPE daemon by just typing it in the command line such as: -

/usr/local/nagios/libexec/check_nrpe -H -c check_disk_root

…which works fine. But I always get an orange UNKNOWN result in the web interface with “no output returned from plugin” even though it works fine from the command line. I even tried replacing the $USER1$ macro with the actual path, but same result.

I call it using the following service definitions, which I suppose must be where the problem is somehow.

define service {
use generic-check-disk
name remote-root-part-service
service_description Root Partition NRPE
check_command check_nrpe!check_disk_root
register 0
}

define service {
use generic-check-disk
name remote-root-part-service
service_description Root Partition NRPE
check_command check_nrpe!check_disk_root
register 0
}

define service {
use remote-root-part-service
host_name 252
}

Obviously, the host_name holds the same IP address for the host that I used on the command line.

Any idea why this doesn’t work through the web interface but the plugin works fine through the command line? The NRPE daemon definitely works fine.

Anything I need to look at specifically in the docs?
Edited ]


#2

where can download the NRPE? thank you!


#3

NRPE can be downloaded here: -

nagiosexchange.org/NRPE.77.0 … nagext_pi1[p_view]=126


#4

Fixed above problem - damned typo in my command definition.


#5

Hi Rage,

I understand on the nagios server side you need to make check_nrpe works (with nrpe.cfg), I m using xinetd, however, on the remote host side, do you need to do the same using xinetd ? Thanks.


#6

The NRPE daemon program and the nrpe.cfg file only needs to be on the remote machine. The check_nrpe script needs to be on your host Nagios machine in the libexec directory

The NRPE daemon can be started as a xinetd service if you want.

I don’t really understand what you’re asking but you seem to be confusing where the NRPE daemon needs to run (which is the remote host only)


#7

Yes , I confused … :), so if I understand your points correct

  1. nrpe (either daemon or by xinetd) is running on remote host with nrpe.cfg file
  2. check_nrpe is configured on the nagios server and NO daemon or xinetd is required.
    please confirm and thanks for your understanding.

Regards!