一、在windows服务器上安装NSClient++代理
打开http://sourceforge.net/projects/nscplus/然后下载NSClient++ 0.3.1(根据服务器版本选择32位还是64位),解压到C:\NSClient++
二、在windows服务器上安装NSClient++代理
C:\NSClient++
nsclient++ /install
nsclient++ SysTray install
三、配置打开NSC.INI,反注释掉一些dll
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
;CheckWMI.dll
在Settings段落添加Nagios监控机的IP,allowed_hosts=192.168.1.76在 [NSClient] port修改为12489,接着在服务里重启服务
四、配置Nagios服务器,添加windows主机
[root@tecmint]# vi /usr/local/nagios/etc/objects/windows.cfg
然后将每个主机名改成windows主机名一样,主机地址也改成windows的IP地址
[root@tecmint]# vi /usr/local/nagios/etc/nagios.cfg
反注释掉一行
# Definitions for monitoring a Windows machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg
验证安装
[root@tecmint]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
[root@tecmint]# service nagios restart
五、 验证
打开http://监控机IP/nagios,等一会(时间有点久),全部出现绿表示成功!