check-nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
tomskaczmarek
Posts: 1
Joined: Fri Apr 21, 2023 8:29 am

check-nrpe

Post by tomskaczmarek »

I am new to the latest version of Nagios Core and the nrpe plugin, but I began using these several years ago (earlier versions) when the information in the UBUNTU server documentation seemed to work. I teach a class where I introduce students to monitoring in UBUNTU. We are currently using UBUBTU 22.04 and I have installed NAGIOS 4.1.11 and nagios plugins 2.2.4 on my Nagios server. I have also added nagios plugins (2.2.4) to a remote server to act as a cleint. Documentation seems to indicate using check_nrpe in the command definition in the client service defintion.

I defined a configuration directory for remote host (/usr/local/nagios/etc/hosts) and I have successfully added a host definition for the client; nagios succefully reports the client is up and running. I added a service 2 definitions to check ssh and disk utilization on the client; the ssh service reports, but disk utilization fails; this is where I have a problem.

There are numerous sites (including Nagios nrpe dpcumentation) that suggest to me that check_nrpe is an executable module that resides in /usr/local/nagios/libexec/. I assume that it gathers up the arguments and sends them to the remote client to execute. I have constructed a command definition in commands.cfg that attempts to invoke this module (check_nrpe) using the command_line attribute with the arguments taken from the service definition; this is based on the nagios pulin documentation. I use this for checking disk utilization on the remote client (check_command check_nrpe!.check_all_disks!<IP address for the remote server/client>). Can someone hlep debug this?

Here are portions of the 2 configuration files:
/usr/local/nagios/etc/objects/commands.cfg
...
define command {
command_name check_nrpe
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -C $ARG1$
}
...

/usr/local/nagios/etc/hosts/<name>
...
define service {
use generic-service
host_name remote
service_description SSH
check_command check_ssh
}

define service {
use generic-service
host_name remote
service_description nrpe disk
check_command check_nrpe!check_all_disks!<ip-address>
}
...
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

Re: check-nrpe

Post by kg2857 »

Is nrpe running on the remote host? It might be running from xinetd or as a service.
Go to your host that's being checked and look in /usr/local/nagios/etc/nrpe.cfg and /usr/local/nagios/etc/nrpe/ for the check_all_disks command.
Post Reply