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)

nagios setup

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)

nsclient++ setup

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,

$ vi /usr/local/nagios/etc/nagios.cfg

&  uncomment the following line

# Definitions for monitoring a Windows machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg

/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

$ vi /usr/local/nagios/etc/objects/windows.cfg

A sample host definition is already present in the file, we can either copy it or edit it to point to our windows machine

nagios

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

nagios

Finally, we will verify the nagios configuration file

$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Output should show no errors & warning found, & then we will restart nagios server for changes to take effect.

$ service nagios restart

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.

nagios 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.

 

If you think we have helped you or just want to support us, please consider these :-

Connect to us: Facebook | Twitter | Google Plus

Become a Supporter - Donate us some of you hard earned money: [paypal-donation]

Linux TechLab is thankful for your continued support.