Install Nagios Client On Windows 2008
I have had NSclient++ working with Nagios for a while now. Recently I started testing Nagwin just to see how it would work, out of pure curiosity. I stopped checking a test server with my main Nagios config, set NSclient++ to NRPE mode, and pointed Nagwin at it. It worked great for a few hours then suddenly I started seeing 'UNKNOWN: No Handler for that command.' I figured it has to be Nagwin's fault since it's so new, I'll just unload NRPElistner.dll and return my server to being monitored by check_NT. However now check_NT doesn't work my main Nagios server returns timeout errors and is unable to connect at all. My Nagwin server can connect to it, the server just doesn't know how to handle the check_NRPE commands even though it did with no changes a few hours earlier.
Summary screen will show what services will be installed. Click Install to proceed with installation. Installation progress will appear once server will be adding desired features to system configuration. Once additional components will be installed, summary windows will show what features were installed and if installation was successful. A test from the Icinga server shows whether network communication is functioning (NSCP must be started on the Windows host)::$ telnet 10.0.0.3 12489 Trying 10.0.0.3. Connected to 10.0.0.3. Escape character is '^'. On the Windows machine, the debug mode NSCP shows the connection from 10.0.0.1. Windows Server 2008 Monitoring With Nagios Capabilities. Nagios provides complete monitoring of Microsoft Windows 2000 Professional and Server operating systems – including system metrics, service states, process states, performance counters, event logs, applications (IIS, Exchange, etc), and services (Active Directory, DHCP, etc).
I have been working on this for a day now and am fairly certain it is NSclient++ who is to blame here. My nagwin box has successfully stayed connected to a similar server throughout the night, without any issues. And my main Nagios config is not having any problems at all. I have been able to successfully switch another server between being monitored by nagios and nagwin without any problems by simply loading and unloading the NRPE.dll. I have tried uninstalling NSclient++ and reinstalling with fresh configuration but still receive the errors. As of now the firewall is off on the server, NSclient++ is setup to accept connection from any server, there is no password, I have also turned ssl off, and the NRPE module is loaded. Any Ideas would be appreciated, I am not an advanced Nagios user but I do know my way around it and can easily break it down and set it up again.
I also want to add that while in test mode NSclient++ is unable to handle check_NRPE commands there either.
Not Kyle stop stalking meNot Kyle stop stalking me2 Answers
This might seem like a silly answer but I had a similar issue and it turned out to be a bug in the version of nsclient++. I would recommend upgrading to the latest stable version and see if the issue still occurs.
Nagios For Windows Server 2012
If a fresh configuration file isn't working it does sound like an issue with nsclient++. In this case it might be worth posting a bug for them to take a closer look: http://www.nsclient.org/nscp/newticket or there may already be a bug similar to this in their database.
Also it may be a .dll issue, worth checking event viewer on the machine for additional errors.
Hope this helps you.
pablopabloFirst off there is no 'check_nrpe' command in test mode.NSClient++ is (amongst others) a NRPE broker with a lot of built-in internal commands.
Install Nagios Client On Windows 2008
The normal way to diagnose this would be to:
- stop the service.
- start nsclient++ in 'test' mode. (ie. nsclient++ /test)
- wait..
- check what the log says when the call comes from Nagios (or what you prefer).
- Fix whatever the problem is (normally things like this is related to, SSL configration issues, allowed host configuration issues, and what not).
- (re)start the nsclient++ service
Another option would be to check the log file and/or enable debug logging.Without 'this information' it is very difficult to diagnose.
// Michael Medin
Not the answer you're looking for? Browse other questions tagged windows-server-2008-r2nagiosnsclient++ or ask your own question.
NSClient++ is a windows service that allows performance metrics to be gathered by Nagios (and possibly other monitoring tools). It is an attempt to create a NSClient and NRPE compatible but yet extendable performance service for windows. This guide covers how to install and configure NSClient++ to work with a Nagios Server to collect these metrics.
10 Steps total
Step 1: Download Stable version of NSClient++
Download the Stable version of NSClient++ from http://www.nsclient.org/download/ . There is both a 32 bit and 64bit version so select the one that is right for the target PC.
Step 2: Run Installation binary
Run in Installation binary file just downloaded on the Windows PC. Click Next to start the installation process. Select Typical Installation.
Step 3: Accept the End-User License Agreement
Click the tick box to accept the terms of the agreement then click Next to continue.
Step 4: Choose the Setup Type
Select Typical at the Setup Type unless you have a reason to use one of the other choices.
Step 5: Set path for configuration file
Accept the default for the configuration file path, unless you have a requirement for it to be elsewhere.
Tick the box to install the sample configuration file. Leave the box clear allowing all users write access unless this is something you want to do.
Step 6: Set NSClient++ Configuration
In the next step you will need to configure the NSClient++ agent. Ami presco 435 manual transmission system. These steps
are important! Make sure you:
• Enter the IP address of the Nagios XI or Nagios Core server in the
Allowed hosts box.
• Enter a password in the NSClient password box that will be required
for communication between the Nagios server and the Windows
machine.
• Check the following boxes in the Modules to load section:
◦ Enable common check plugins
◦ Enable nsclient server (check_nt)
Click Next to continue
Step 7: Begin Installation
Click the Install button on the next screen to begin the installation.
Step 8: Finish Installation
When the installation completes, click Finish to complete the setup.
The NSClient++ agent will now be running as a service, which means the
Windows machine is ready to be monitored with Nagios.
Step 9: Configure check_nt on Nagios server
You'll need to modify the check_nt command definition to include the password. Open the commands.cfg file for editing.
vi /usr/local/nagios/etc/objects/commands.cfg
Change the definition of the check_nt command to include the '-s ' argument (where PASSWORD is the password you specified on the Windows machine) like this:
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s PASSWORD -v $ARG1$ $ARG2$
}
Save the file.
Step 10: Restart Nagios Service
To apply the changes you need to restart Nagios by running the following command;
service nagios restart
Assuming you use the same password for each windows machine you install on you should be now able to get Nagios to monitor that PC using the standard Windows test supplied in the sample config, plus any others you may want to create using the check_nt command. Refer to the Nagios documentation (http://nagios.sourceforge.net/docs/nagioscore/4/en/) for more information on how to configure these checks or for more details about Nagios.
References
- Monitoring Windows Machines
- Nagios XI – Installing The Windows Agent
1 Comment
- Ghost ChiliNick42 Aug 20, 2014 at 07:26am
Well done howt-to. If I could offer up one thing, you might want to cover setting the port number on the client (just in case you need to use a different port), and modifying the Windows firewall if active. :)