Nagios Server : Adding Windows host to Nagios server for monitoring

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

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

/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


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

$ /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:

Linux TechLab is thankful for your continued support.


Passionate about Linux & open source. Loves to learn, read & write about Linux as well as new technologies.

You may also like...

17 Responses

  1. rania says:

    thanks for that tutorial
    i’ve followed all the steps but i have a error in all services

    C:\ Drive Space
    UNKNOWN 11-30-2017 09:08:25 0d 21h 18m 59s 3/3 NSClient – ERROR: No performance data from command: check_drivesize
    CPU Load
    UNKNOWN 11-30-2017 09:08:44 0d 21h 18m 0s 3/3 NSClient – ERROR: No performance data from command: check_cpu
    Load Average
    OK 11-30-2017 09:09:26 0d 0h 2m 36s 1/3 OK – Charge moyenne: 0.00, 0.01, 0.05
    Memory Usage
    UNKNOWN 11-30-2017 09:08:56 0d 21h 16m 3s 3/3 NSClient – ERROR: No performance data from command: check_memory
    NSClient++ Version
    OK 11-30-2017 09:10:27 0d 0h 58m 54s 1/3 NSClient++ 2017-08-30
    UNKNOWN 11-30-2017 09:09:07 0d 21h 14m 5s 3/3 NSClient – ERROR: No performance data from command: check_uptime

    in the nsclient.log i have

    2017-11-30 08:59:09: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): check_uptime available commands: commands {, submit_nsca}, plugins {, 1}

    can you help

  2. thegeekaid says:

    problem in services
    CRITICAL – Socket timeout

  3. Sheikh Zulqarnain says:

    How you add tcp port monitoring for windows?

  4. Henry says:

    Hi i’m getting Socket timeout im monitoring windows server 2012
    any idea

  5. Henry says:

    For all here

  6. prabhu says:

    how to add multiple windows host in nagios ?

  7. Matteo says:

    hello! I have an error on nagios when I verify the nagios configuration file:
    Reading configuration data…
    Read main config file okay…
    Warning: Duplicate definition found for host ‘servername’ (config file ‘/usr/local/nagios/etc/servers/hosts.cfg’, starting on line 7)
    Error: Could not add object property in file ‘/usr/local/nagios/etc/servers/hosts.cfg’ on line 9.
    Error: Invalid max_check_attempts value for host ‘servername’
    Error: Could not register host (config file ‘/usr/local/nagios/etc/servers/hosts.cfg’, starting on line 7)
    Error processing object config files!
    Any idea?

    • Shusain says:

      This error mainly occurs when you are using same name in more than one place. Like for example, you might be using localhost at more than one place.

  8. Aymen says:

    Hi thanks for that tutorial
    why the host status is down ?

  9. Michelle says:

    I am getting this for all of my services. I have looked online and no articles have matched my situation. What is wrong?

    Active Directory Domain Service

    UNKNOWN 11-16-2018 12:52:50 14d 0h 54m 57s 3/3 check_nt: Could not parse arguments

    C:\ Drive Space

    UNKNOWN 11-16-2018 12:47:12 14d 0h 53m 5s 3/3 check_nt: Could not parse arguments

    CPU Load

    UNKNOWN 11-16-2018 12:46:34 14d 0h 51m 14s 3/3 check_nt: Could not parse arguments

    DNS Server

    UNKNOWN 11-16-2018 12:48:23 14d 0h 49m 22s 3/3 check_nt: Could not parse arguments


    UNKNOWN 11-16-2018 12:52:21 14d 0h 47m 31s 3/3 check_nt: Could not parse arguments

    Memory Usage

    UNKNOWN 11-16-2018 12:53:11 14d 0h 54m 35s 3/3 check_nt: Could not parse arguments

    NSClient++ Version

    UNKNOWN 11-16-2018 12:49:04 14d 0h 52m 43s 3/3 check_nt: Could not parse arguments


    UNKNOWN 11-16-2018 12:46:56 14d 0h 50m 51s 3/3 check_nt: Could not parse arguments

Leave a Reply

Your email address will not be published. Required fields are marked *