Enabling The NRPE Listener in NSClient 0.4.x For Nagios XI
Enabling The NRPE Listener in NSClient 0.4.x For Nagios XI
Enabling The NRPE Listener in NSClient 0.4.x For Nagios XI
NSClient++ 0.4.x
Purpose
This document describes how to enable and configure the NRPE Listener in NSClient++ 0.4.x (and newer) for Nagios XI on a remote
windows machine. The NRPE listener allows the Nagios XI server to perform more advanced and customized monitoring methods
using check_nrpe (compared to requests using check_nt).
Some reasons you may want to use check_nrpe instead of check_nt are:
The built in CPU / memory / disk checks are more flexible and customizable
The CheckExternalScripts module can execute various user written script (VB / BAT / EXE / Perl / Python / PowerShell).
Uses SSL
Target Audience
This document is intended for use by Nagios XI Administrators that want to enable NRPE in NSClient++.
Requirements
Note: This document is for version 0.4.x of NSClient++. For version 0.3.x of NSClient++ see:
https://assets.nagios.com/downloads/nagiosxi/docs/Enabling-The-NRPE-Listener-In-NSClient-0.3.x.pdf
The following documentation explains how the configuration file works in NSClient++ and may also be helpful:
https://assets.nagios.com/downloads/nagiosxi/docs/Configuring-The-Windows-Agent-NSClient++-for-Nagios-XI.pdf
The configuration file in NSClient++ 0.4.x is called nsclient.ini and is located here:
C:\Program Files\NSClient++\nsclient.ini
The configuration file can be manually edited OR you can execute commands in a command prompt to make the required changes in
the configuration file. This document instructs you to execute the commands to make the changes. Following this is a summary
showing you the updated settings in the configuration file.
cd "C:\Program Files\NSClient++"
nscp settings --activate-module NRPEServer --add-defaults
nscp settings --path /settings/NRPE/server --key "allow arguments" --set true
nscp settings --path /settings/NRPE/server --key "allow nasty characters" --set true
nscp settings --path /settings/NRPE/server --key insecure --set true
nscp settings --activate-module CheckExternalScripts --add-defaults
nscp settings --path "/settings/external scripts" --key "allow arguments" --set true
nscp settings --path "/settings/external scripts" --key "allow nasty characters" --set true
This should not produce any output, however don't be alarmed if you see some Failed to register plugin errors.
Open the configuration file nsclient.ini in a text editor for editing (like Notepad) to see the updated configurations.
Under the [/modules] section you will see the following lines:
NRPEServer = enabled
CheckExternalScripts = enabled
Under the [/settings/NRPE/server] section you will see the following lines:
What does allow arguments , allow nasty characters and insecure do?
allow arguments
This allows you send options in the check_nrpe command, it allows for flexible monitoring configurations.
allow nasty characters
This allows the `&><'"\[]{} characters to be used in the arguments.
insecure
Version 2.15 and earlier of check_nrpe on the Nagios XI server use an older SSL method that has been superseded
by newer technology. check_npre v3 and newer provide more secure methods however to allow backward
compatibility the insecure setting needs to be enabled in nsclient.ini.
NSClient must now be restarted. In the Windows open the Services console under Administrative Tools. If you cannot locate this, use
services.msc to open the Services console.
cd /usr/local/nagios/libexec/
./check_nrpe -H [IP of the windows system]
You now should see the I seem to be doing fine... output, verifying the test is successful.
Additional Resources
The following documents demonstrate the different ways that NRPE can be utilized.
Finishing Up
You should now have successfully configured the NRPE Listener on the target system running NSClient++. For any other support
related questions, please visit the Nagios Support Forums at:
https://support.nagios.com/forum/