NrpeMonitor
The NrpeMonitor lets you test plugins and checks running on the Nagios Remote Plugin Executor (NRPE) framework.
Horizon and Nagios have several conceptional differences. In Horizon, 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 than 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 Horizon.
NRPE configuration on the server is required and the check command has to be configured; for example, command[check_apt]=/usr/lib/nagios/plugins/check_apt
|
Horizon runs every NRPE check in a Java thread without fork() a process, and is more resource friendly.
Nevertheless, it is possible to run NRPE plugins that combine a lot of external programs like sed, awk, or cut.
Be aware that each command forks additional processes.
|
Configuration and use
Parameter | Description | Default |
---|---|---|
Required |
||
command |
The {check_name} of the command configured as |
empty |
Optional |
||
retry |
Number of retries before the service is marked as down. |
0 |
port |
Port to access NRPE on the remote server. |
5666 |
padding |
Padding for sending the command to the NRPE agent. |
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 |
true |
This monitor implements the Common Configuration Parameters.
Example: Using check_apt with NRPE
This example shows how to configure the NrpeMonitor running the check_apt command on a configured NRPE.
command[check_apt]=/usr/lib/nagios/plugins/check_apt
<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" />