0% found this document useful (0 votes)
58 views6 pages

Enabling The NRPE Listener in NSClient 0.4

Uploaded by

rachellewadjie2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views6 pages

Enabling The NRPE Listener in NSClient 0.4

Uploaded by

rachellewadjie2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

How To Use NRPE And NSClient++ With Nagios XI

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

www.nagios.com

Copyright © 2024 Nagios Enterprises, LLC. All rights reserved. Trademarks are the property of their respective owner.
How To Use NRPE And NSClient++ With Nagios XI

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.

www.nagios.com

Copyright © 2024 Nagios Enterprises, LLC. All rights reserved. Trademarks are the property of their respective owner.
How To Use NRPE And NSClient++ With Nagios XI

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
o This allows you to send options in the check_nrpe command, it allows for
flexible monitoring configurations
• allow nasty characters
o This allows the `&><'"\[]{} characters to be used in the arguments
• insecure
o 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.

www.nagios.com

Copyright © 2024 Nagios Enterprises, LLC. All rights reserved. Trademarks are the property of their respective owner.
How To Use NRPE And NSClient++ With Nagios XI

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.

www.nagios.com

Copyright © 2024 Nagios Enterprises, LLC. All rights reserved. Trademarks are the property of their respective owner.
How To Use NRPE And NSClient++ With Nagios XI

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.

www.nagios.com

Copyright © 2024 Nagios Enterprises, LLC. All rights reserved. Trademarks are the property of their respective owner.
How To Use NRPE And NSClient++ With Nagios XI

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

www.nagios.com

Copyright © 2024 Nagios Enterprises, LLC. All rights reserved. Trademarks are the property of their respective owner.

You might also like