The Industry Standard In Infrastructure Monitoring
Nagios XI Enabling the NRPE Listener In 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
• A running Nagios XI server
• NSClient++ 0.4.x (or newer) installed on the Windows Client as per this documentation:
◦ Installing The Windows Agent NSClient++ for Nagios XI
Note: This document is for version 0.4.x of NSClient++. For version 0.3.x of NSClient++ see:
Enabling The NRPE Listener In NSClient 0.3.x
The following documentation explains how the configuration file works in NSClient++ and may also be helpful:
Configuring The Windows Agent NSClient++ for Nagios XI
1295 Bandana Blvd N, St. Paul, MN 55108 sales@nagios.com US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 1 / 5
Updated – January, 2018
The Industry Standard In Infrastructure Monitoring
Nagios XI Enabling the NRPE Listener In NSClient++ 0.4.x
Update NSClient++ Configuration
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.
Log onto your remote windows machine as an administrator.
Open a command prompt with administrative rights and run the following commands:
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 --path /settings/NRPE/server --key "verify mode" --set none
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.
1295 Bandana Blvd N, St. Paul, MN 55108 sales@nagios.com US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 2 / 5
Updated – January, 2018
The Industry Standard In Infrastructure Monitoring
Nagios XI Enabling the NRPE Listener In NSClient++ 0.4.x
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:
allow arguments = true
allow nasty characters = true
insecure = true
verify mode = none
Under the [/settings/external scripts] section you will see the following lines:
allow arguments = true
allow nasty characters = true
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_nrpe v3 and newer provide more secure methods
however to allow backward compatibility the insecure setting needs to be enabled in nsclient.ini.
1295 Bandana Blvd N, St. Paul, MN 55108 sales@nagios.com US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 3 / 5
Updated – January, 2018
The Industry Standard In Infrastructure Monitoring
Nagios XI Enabling the NRPE Listener In NSClient++ 0.4.x
Restarting The NSClient++ Service
NSClient must now be restarted. In Windows open the Services console under Administrative Tools. If you
cannot locate this, use services.msc to open the Services console.
Locate the NSClient++ service.
Right click the NSClient++ service and select Restart.
You can close the Services console as it's no longer
required.
Testing On The Nagios XI Server
Log in as root to the Nagios XI Server and enter the following:
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.
1295 Bandana Blvd N, St. Paul, MN 55108 sales@nagios.com US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 4 / 5
Updated – January, 2018
The Industry Standard In Infrastructure Monitoring
Nagios XI Enabling the NRPE Listener In NSClient++ 0.4.x
Additional Resources
The following documents demonstrate the different ways that NRPE can be utilized.
• Integrating AutoIt With Nagios XI
• Checking For Windows Updates With Nagios XI
• Monitoring Performance Counters in Nagios Using NSClient++
• Windows Memory Usage – Physical
• How to Restart A Windows Service With NRPE
• Using Scripts / Plugins With NSClient++
• Knowledgebase Check Library
Finishing Up
This completes the documentation enabling the NRPE listener in NSClient++ 0.4.x.
If you have additional questions or other support related questions, please visit us at our Nagios Support
Forums:
https://support.nagios.com/forum
The Nagios Support Knowledgebase is also a great support resource:
https://support.nagios.com/kb
1295 Bandana Blvd N, St. Paul, MN 55108 sales@nagios.com US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 5 / 5
Updated – January, 2018