Thursday , October 29 2020

How to monitor Windows Host by Nagios Core

This is the time to add and monitor Windows host by Nagios Core NMS. We need NSClient++ addon to be downloaded and installed on Windows host that is required to be monitored.

Download NSClient++:

http://nsclient.org/stable/

–  Install it, give NMS Server’s IP and Password when asked during setup.

– Finish Setup

– Edit config file, set Server’s IP in “Allowed Hosts” field and password as show below:

1- nsclient config file

 

2- nsclient config edit

– Edit NSClient++ Service:

– enter following in run command:    services.msc
– Double click “NSclient++” Service
– Click on “Logon On” tab
– Select option:    “Allow Service to interact with desktop”
– click “OK”

3- nsclient Serice

Create Host config file on NMS Server:

# vim /etc/nagios/objects/WindowsHost.cfg

Add following lines:

##############################################################################
#
# HOST DEFINITIONS
#
##############################################################################

define host{
use             windows-server  ; Inherit default values from a template
host_name       SVN_Server_12   ; The name we’re giving to this host
alias           SVN Server 12   ; A longer name associated with the host
address         << IP  >>   ; IP address of the host
statusmap_image     win40.gd2
icon_image          win40.png

}

###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################

define service{
use                     generic-service
host_name               SVN_Server_12
service_description     Uptime
check_command           check_nt!UPTIME
}

define service{
use                     generic-service
host_name               SVN_Server_12
service_description     CPU Load
check_command           check_nt!CPULOAD!-l 5,80,90
}

 

4- windows config file

 

– Add check_nt command with password in “commands.cfg” file:

define command{
command_name    check_nt
command_line    $USER1$/check_nt -H $HOSTADDRESS$ -s passtomonit -p 12489 -t 180 -v $ARG1$ $ARG2$
}

 

5- check_nt command

 

– Add host to Nagios Config file “nagios.cfg”

cfg_file=/etc/nagios/objects/windowshost.cfg

– Restart Nagios Server

– Done

About Muhammad Attique

Check these out :)

How to Install & Configure Google Chrome on Kali Linux

In this blog post, I’m going to demonstrate step by step how to install & …

Leave a Reply

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

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

I agree to these terms.