How to Monitor Remote Windows Host using Nagios

Channel: Linux
Abstract: # Windows Host 001 configuration fileYou Nagios client setup has been completed on your windows host. Now you can add this host in Nagios server. Step

Nagios is most powerful infrastructure monitoring tools. Our earlier articles describes nagios core service installation and configure nagiosql with nagios core server. In this articles we are going to configure windows hosts to be monitor by Nagios server.

Similar to NRPE service on Linux, NSClinet++ is the service for windows hosts to monitor through check_nrpe from nagios server. 「How to Install and Configure NSClient++ and Monitor Remote Windows Host

Step 1 – Install NSClient++

Download the latest version of NSClient from its official site and start installation as below. The software will be named NSCP-xxxxxx.msi. During the installation process, you would require to enter the Nagios server to allow the server to connect the client through NRPE.

START the installation

Accept the license terms and click Next

Click on Complete setup type

Select the permissions on nsclient++ configuration file

Enter Nagios server ip in Allowed Hosts and enter password

Click on Install button

Finish Installation

Step 2 – Verify Connectivity from Nagios Server

After installing NSClient++ on your system. Let’s verify that your nagios server is properly connecting to windows client through nrpe service. To do this login to your nagios server and run following command. For example my windows client ip is 192.168.1.10.

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.10

[Sample Output]
I (0,4,1,105 2014-04-28) seem to be doing fine...

You Nagios client setup has been completed on your windows host. Now you can add this host in Nagios server.

Step 3 – Adding Host in Nagios Server

We recommend using NagiosQL3 for configuration Nagios. It provides a user-friendly web interface for managing your Nagios service. In case you are not using nagiosql and want to add your host in Nagios server.

Create a configuration file /usr/local/nagios/etc/servers/MyWindowsHost001.cfg using below values. for example you windows hosts ip is 192.168.1.10. We also need to define a service with host. So add a ping check service, which will continuously check that host is up.

#########################################################
# Windows Host 001 configuration file
#########################################################

define host {
        use                          windows-server
        host_name                    Windows_Host_001
        alias                        Windows Host 001
        address                      192.168.1.10
        register                     1
}
define service{
      host_name                       Windows_Host_001
      service_description             PING
      check_command                   check_ping!100.0,20%!500.0,60%
      max_check_attempts              2
      check_interval                  2
      retry_interval                  2
      check_period                    24x7
      check_freshness                 1
      contact_groups                  admins
      notification_interval           2
      notification_period             24x7
      notifications_enabled           1
      register                        1
}


#########################################################
# END OF FILE
#########################################################

Now verify configuration files using following command. If there are no errors found in configuration, restart nagios service.

nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios restart

Now open your nagios web interface and check for new hosts added in nagios core service. In my case, it looks like below.

Ref From: tecadmin

Related articles