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

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

Step 1: and 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 installation process, you would require to enter nagios server to allow server to connect nsclient through nrpe.

START the installation using .msi file

nsclient-1

Accept the license terms and click Next

nsclient-2

Click on Complete type

nsclient-3

Select the permissions on nsclient++ configuration file

nsclient-4

Enter Nagios server in Allowed Hosts and enter

nsclient-5

Click on Install button

nsclient-6

Finish Installation

nsclient-7

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 . 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 using Configuration File

We recommend to use 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.
add-host-in-nagios

Print Friendly

Comments

comments

Bài viết liên quan