Nagios Server : Adding Windows host to Nagios server for monitoring
Last updated on March 18th, 2018 at 09:02 pm
Hello Linux-fanatics, earlier we discussed “Installation & configuration of Nagios server” & now in this tutorial, we will learn to add windows host for monitoring on Nagios server.
To add a Windows host to Nagios server, we need a plugin called NSclient++. NSclient++ acts as a proxy or an intermediary between Nagios server & Windows machine. NSclient ++ communicates with the help check_nt plugin.
Now we will proceed with the steps required to adding Windows host to Nagios server…
(Recommended Read: Complete monitoring solution : Install OMD (Open Monitoring Distribution))
(Also Read: Monitoring network bandwidth with iftop command )
STEP 1 Downloading & installing NSclient++
We can download the latest version of NSclient++ from following link on the windows machine https://sourceforge.net/projects/nscplus/
Once you have downloaded the file which is a .msi file, double click on it to run the setup. Hit next on the setup screen, it will then ask you to accept the license agreement , accept & hit next again.
Then choose the typical setup & hit next again. You will be then asked if you would like to install some sample configurations file , leave it as it & hit next.
Now comes the main part of setup, here you will be asked to enter the IP of nagios server (refer to screenshot below)
Then click on next & then install to complete the setup. After installation is complete, we need to start NSclient++ by going into you r start menu & selecting “Start NSclient++” (see screenshot)
Our installation on Windows hosts is now complete. We will configure our Nagios server for adding windows host.
STEP 2 Configuring Nagios server
Firstly, open nagios configuration file,
& uncomment the following line
/usr/local/nagios/etc/objects/windows.cfg is the file where we will add information about our Windows hosts. Now we will edit the windows.cfg file
A sample host definition is already present in the file, we can either copy it or edit it to point to our windows machine
And below Host Definition are some Service Definitions, if you want to add more services this would be the place to do it. Otherwise just change the host name in these service definitions & you are done
Finally, we will verify the nagios configuration file
Output should show no errors & warning found, & then we will restart nagios server for changes to take effect.
STEP 3 Open Web-console
Now we will login to our nagios webcosole & goto services overview. We will now find that all the windows services are also being shown here along with our localhost services.
That’s it guys your work is done. In next tutorial we will learn to add Linux machines on nagios server for monitoring.
Don’t forget to leave you valuable comments/queries below in our comment box.