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++:
– 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:
– Edit NSClient++ Service:
– Double click “NSclient++” Service
– Click on “Logon On” tab
– Select option: “Allow Service to interact with desktop”
– click “OK”
Create Host config file on NMS Server:
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
}
– Add check_nt command with password in “commands.cfg” file:
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -s passtomonit -p 12489 -t 180 -v $ARG1$ $ARG2$
}
– Add host to Nagios Config file “nagios.cfg”
– Restart Nagios Server
– Done