I. Monitoring requirements:
Remote monitoring of custom TCP ports on Windows Servers
1. Linux machines are relatively simple. Use the check_tcp plug-in (the steps are omitted)
2. Windows machine, using the check_nt plug-in, check_nt for detailed usage see http://nagiosplugins.org/man/check_nt
A. First install nsclient ++
B. Edit
/Usr/local/Nagios/etc/objects/commands. cfg configuration file
Add the following section
# 'Check _ port' command Definition
# Add By chengh 09-09-11
Define command {
Command_name check_port
Command_line $ user1 $/check_nt-h $ arg1 $-p $ arg2 $-s 0qxdf7r1_hfdruy7-V $ arg3 $
}
Note: The-s option is not required.
C. Edit the host configuration under/usr/local/Nagios/etc/objects and add the host address and TCP port to be monitored.
Define Service {
Use System
Host_name nd-InfoPlatform-91note-cnc-1
Service_description checkaccountserverport9867
Normal_check_interval 4
Retry_check_interval 1
Contact_groups 91 noteaccountserver
Check_command check_port! 58.22.105.139! 9867! Clientversion
# Check_command check_port! IP address! Port value! Clientversion
}
Note: the IP address and port must be used between them! Separate
D. configure the firewall or IPSec to enable the access permission for the corresponding port.
E,/usr/local/Nagios/bin/Nagios-V/usr/local/Nagios/etc/Nagios. cfg
F. killall-hup Nagios