接着配置服务端(监控端)
cd /service/nagios/etc/objects
vim commands.cfg
在底端添加如下程序:(如果存在就叫不用添加了)
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
接着修改当前路径下的windows.cfg,并且添加相应的监控服务
define host{
use windows-server
host_name winhost (自定义修改)
alias My Windows Server (自定义修改)
address 192.168.10.127 (windows主机,即被控端的ip)
}
添加程序:
define service{
use generic-service
host_name winhost
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}