One, the configuration of the monitored Windows XP client
1. Install nsclient++ and install
: Http://sourceforge.net/projects/nscplus
Nsclient++-0.3.8-win32.msi
Nsclient++-0.3.8-x64.msi
2, Installation nsclient++
Double-click Install---next----next to next---set Allow IP, set password (here the password can not be set in general), Modules to load (select the first three modules on it, the 2nd one for CHECT_NT for Windows monitoring, 3rd for Checp_nrpe for monitoring Linux), next, install, finish
3. Start the NSCLIENTPP service and allow interactive service
4. If Windows turns on your own firewall, you must set the program to
Second, the Monitoring side host settings (Nagios server)
1, check the Nagios directory Libexec subdirectory, must exist CHECK_NT (for example:/USR/LOCAL/NAGIOS/LIBEXEC/CHECK_NT)
2, configure the Command.cfg file (for example:/usr/local/nagios/etc/objects/command.cfg), add the following lines (default should already have)
#/usr/local/nagios/etc/objects/command.cfg
# ' check_nt ' command definition
Define Command{
Command_name check_nt
Command_line $USER 1$/check_nt-h $HOSTADDRESS $-P 12489-v $ARG 1$ $ARG 2$
}
3. Compiling nagios.cfg files
#/usr/local/nagios/etc/nagios.cfg, open the following line
# Definitions for monitoring a Windows machine
Cfg_file=/usr/local/nagios/etc/objects/windows.cfg
#vi/usr/local/nagios/etc/objects/windows.cfg, the following is the configuration of the main monitoring project
#定义要被监控的windows主机名与主机的IP地址
Define Host{
Use Windows-server
HOST_NAME Ruanxi
Alias My Windows Server
Address 192.168.0.5
}
#定义一个主机名组 (no need to control it)
Define Hostgroup{
Hostgroup_name windows-servers
Alias Windows Servers
}
#检查windows主机是否已经安装了NSClient + +, and its version number
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description nsclient++ Version
Check_command check_nt! ClientVersion
}
#监控 the start-up time for Windows hosts
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description Uptime
Check_command check_nt! UPTIME
}
CPU load for #监控 Windows host
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description CPU Load
Check_command check_nt! Cpuload!-l 5,80,90 #CPU如果到达80% alarm, 90% siren
}
#监控 memory usage for Windows hosts
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description Memory Usage
Check_command check_nt! Memuse!-w 80-c #内存使用到达80% is warn, reaching 90% critical
}
C + + for #监控 Windows host The amount of space used
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description c \ Drive Space
Check_command check_nt! Useddiskspace!-l C-w 80-c 90
}
#监控 the action state of the W3SVC settings for a Windows host
------> This service is a Web server-related log service program
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description w3svc
Check_command check_nt! servicestate!-d showall-l W3SVC
}
#监控 the operation of the Explorer.exe execution program of the Windows host, if the program terminates, it will send Critica
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description Explorer
Check_command check_nt! procstate!-d showall-l Explorer.exe
}
#监控 the operation of the MSSQLSERVER service for Windows hosts, such as when the service is terminated, CRITICAL will be issued
Define Service{
Use Generic-service
HOST_NAME Ruanxi
Service_description MSSQL
Check_command check_nt! servicestate!-d showall-l MSSQLSERVER
}
Note: If you have more than one Windows XP client to monitor, then you can write more than this.
3. Check the nagios.cfg file for errors
#nagios-C nagios.cfg
4. Restart the Nagios service
#service Nagios Restart
5. Visit the page to view
#elinks http://localhost/nagios/
Nagios Client Installation and configuration Windows Chapter