NrpeMonitor

Lets you test plugins and checks running on the Nagios Remote Plugin Executor (NRPE) framework.

Meridian and Nagios have several conceptional differences. In Meridian, a service can only be available or not available and the response time for the service is measured. Nagios, on the other hand, combines service availability, performance data collection, and thresholding in one check command. For this reason, a Nagios check command can have more states then OK and CRITICAL. Using the NrpeMonitor marks all check command results other than OK as DOWN. The full output of the check command output message is passed into the service down event in Meridian.

NRPE configuration on the server is required and the check command has to be configured, e.g. command[check_apt]=/usr/lib/nagios/plugins/check_apt
Meridian executes every NRPE check in a Java thread without fork() a process and it is more resource friendly. Nevertheless it is possible to run NRPE plugins which combine a lot of external programs like sed, awk or cut. Be aware, each command end up in forking additional processes.

Monitor Facts

Class Name

org.opennms.netmgt.poller.monitors.NrpeMonitor

Remote Enabled

false

Configuration and Use

Table 1. Monitor specific parameters for the NrpeMonitor
Parameter Description Required Default value

retry

Number of retries before the service is marked as down.

optional

0

command

The {\check_name} of the command configured as `command[{\check_name}]="/path/to/plugin/check-script"

required

empty

port

Port to access NRPE on the remote server.

optional

5666

padding

Padding for sending the command to the NRPE agent.

optional

2

usessl

Enable encryption of network communication. NRPE uses SSL with anonymous DH and the following cipher suite TLS_DH_anon_WITH_AES_128_CBC_SHA

optional

true

This monitor implements the Common Configuration Parameters.

Example: Using check_apt with NRPE

This examples shows how to configure the NrpeMonitor running the check_apt command on a configured NRPE.

Configuration of the NRPE check command on the agent in 'nrpe.cfg'
command[check_apt]=/usr/lib/nagios/plugins/check_apt
Configuration to test the NRPE plugin with the NrpeMonitor
<service name="NRPE-Check-APT" interval="300000" user-defined="false" status="on">
  <parameter key="retry" value="3" />
  <parameter key="timeout" value="3000" />
  <parameter key="port" value="5666" />
  <parameter key="command" value="check_apt" />
  <parameter key="padding" value="2" />
</service>

<monitor service="NRPE-Check-APT" class-name="org.opennms.netmgt.poller.monitors.NrpeMonitor" />