Windows 下 NSClient++ 的建置
1.取得最新版本:(Download)
Windows Client 端「NSClient++」:NSClient++-Win32-0.3.0.zip(NSClient++-Win32-VERSION.zip)
架构如下:
参考官方网页
http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html
2.解压缩 NSClient++-Win32-0.3.0.zip
于 C:\ 下解压缩为 C:\NSClient++
3.安装 NSClient++
开启 cmd,切换到 C:\NSClient++,执行 NSClient++ /install 进行安装
执行 NSClient++ SysTray install 注意大小写,这一步是安装系统小图标
4.编辑 C:\NSClient++ 下的 NSC.ini 文件
[modules] 中,所有的 .dll 注释都全都去掉,除了 CheckWMI.dll and RemoteConfiguration.dll
[Settings] 中,'password' 这个项目是在设置密码,作用是在 nagios 监控主机进行联机时,要求提供密码才能进一步进行联机,这里为了方便起见,跳过它,不要设定密码。
[Settings] 中,'allowed_hosts' 选项的 mark 去掉,并且加上 nagios 的监控主机的 IP,修改如下 allowed_hosts=127.0.0.1/32,192.168.0.11 以逗点相隔。
[NSClient] 中,'port' 选项的 mark 须要拿掉,并且它的值是 '12489',这是 NSClient 的预设 port
● 设定完成之后,启动 NSClient++
在 cmd 中 C:\NSClient++ 下,执行 NSClient++ /start
在 cmd 下,执行 netstat -an ,检查 port 12489 是否开启
5.监控端主机的设定:
● libexec 下须要 check_nt 执行程序。
● 设定 commands.cfg
增加:
# 'check_nt' windows client command definition for remote service
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
● 设定主要监控项目 service.cfg
# 监控 windows 主机的开机运作时间
define service{
use remote-service ; Name of service template to use
hostgroup_name windows-servers
service_description System Uptime
check_command check_nt!UPTIME
}
# 监控 windows 主机的 CPU 负载
define service{
use remote-service ; Name of service template to use
hostgroup_name windows-servers
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
监控 windows 主机的内存使用状况
define service{
use remote-service ; Name of service template to use
hostgroup_name windows-servers
service_description Memory usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
监控 windows 主机的 C:\ 的空间使用量
define service{
use remote-service ; Name of service template to use
hostgroup_name windows-servers
service_description c:\ - total
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
另外还有:
监控 windows 主机的 MSSQLSERVER 服务的运作状况,如服务终止了,则会发 CRITICAL
check_command check_nt!SERVICESTATE!-d SHOWALL -l MSSQLSERVER
监控 windows 主机的 Explorer.exe 执行程序的运作状况,如程序终止了,则会发 CRITICAL
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
6.问题排除
2008-02-12 17:44:24: error:.\PDHCollector.cpp:99: Detected language: 0x0404 but it could not be found in: counters.defs
2008-02-12 17:44:24: error:.\PDHCollector.cpp:100: You need to manually configure performance counters!
● 初步安装好时, NSClient++ 会有上述的错误,原因是操作语系的问题,NSClient++ 默认支持 OS 的语言并不多,所以这部份须进行手动配置,检示错误讯息为「0x0404」这个语系,直接复制「English US」这个项目内所有的数据,以「0x0404」这个语系取代,如下:
修改 C:\NSClient++ 下 counters.defs 这个档案
[0x0404]
Description = "Chinese BIG5"
NT4_SystemTotalProcessorTime = "\System\% Total Processor Time"
NT4_SystemSystemUpTime = "\System\System Up Time"
NT4_MemoryCommitLimit = "\Memory\Commit Limit"
NT4_MemoryCommitByte = "\Memory\Committed Bytes"
W2K_SystemTotalProcessorTime = "\Processor(_total)\% Processor Time"
W2K_SystemSystemUpTime = "\System\System Up Time"
W2K_MemoryCommitLimit = "\Memory\Commit Limit"
W2K_MemoryCommitByte = "\Memory\Committed Bytes"
● 修改完后,重开 NSClient++ 即可
分享到:
相关推荐
NSClient++的官方说明文档,对NSClient++的各个组件讲的很详细
NSClient++-0.3.8-Win64.msi
NSClient++最新版 包含x86和x64兩個,安全穩定
NSClient++-0.3.9-x643用于nagios的插件
nsclient++,nagios监控软件window平台客户端程序。
NSClient++-0.2.7
nagios是监控站点,服务器各种服务的软件,这款客户端里面包括能使用于32位和64位的服务器。此包里面的ini文件有使用于大中型网络公司所监控的服务,各方面的监控也是相当全面。
Nagios+Centreon+Nrpe+NSClient++完全配置笔记
Nagios在Windows下的应用 图文并茂~非常好理解~
NSClient ++ 稳定0.4.4: 掌握: NSClient ++(nscp)旨在成为一个简单但功能强大且安全的监视守护程序。 它是为Nagios / Icinga构建的,但是守护进程中没有任何内容是Nagios / Icinga特定的,并且可以在要接收...
nagios windows下的监控软件
一个全攻略的Nagios+Centreon+Nrpe+PHP+Mysql+NSClient完全安装
nagios windowsnagios windowsnagios windowsnagios windows
NSClient ++是Windows服务,它允许Nagios(以及可能的其他监视工具)收集性能指标。 试图为Windows创建与NSClient和NRPE兼容但可扩展的性能服务。
nagios被监控端NSClient,用于windows的被监控端,
内含最新NSClient++0.3.9X86和X64版本,当然从官方网站下载也可以
NSClient++是用来监控Windows主机时安装在Windows主机上的组件。被监控机上安装NSClient,,当监控主机将监控请求发给NSClient后,NSClient直接完成监控,所有的监控是由NSClient完成的.不需要额外的插件。这也说明了...