NSClient++ for windows 配置
NSClient++ 的相关模块:CheckDisk (module)
CheckEventLog (module)
CheckExternalScripts (module)
CheckHelpers (module)
CheckSystem (module)
CheckTaskSched (module)
CheckWMI (module)
FileLogger (module)
LUAScript (module)
NRPEListener (module)
NSCAAgent (module)
NSClientListener (module)
RemoteConfiguration (module)
SysTray (module)
总共14个模块
有三种方式可以去监控windows主机
nagios主机端 windows客户机端 windows客户端端口
1 check_nt NSClientListener 12489/tcp
2 check_nrpe NRPEListener 5666/tcp
3. NSCA 5667/tcp NSCAAgent 5666/tcp
推荐第二种
关于第二种配置模块详细说明如下:
use_ssl
allow_arguments
allow_nasty_meta_chars
CheckSystem.dll
CheckDisk.dll
CheckExternalScripts.dll
FileLogger.dll
NRPEListener.dll
nrpe 有很多内置的命令如下:
语法:
check_nrpe ... -c[-a ]
example:
check_nrpe ... -c CheckCPU -a warn=80 crit=90 time=20m time=10s time=4
CPU Load ok.|'20m average'=11%;80;90; '10s average'=7%;80;90; '4 average'=10%;80;90;
如何用nrpe来做监控windows服务器的某个硬件呢?请看下面配置
步骤一: 先设置要监控的某个对象使用的命令,假如要监控内存使用状态,编译command.cfg添加如下:
[*]define command{
[*] command_name CheckMEM
[*] command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=page type=paged type=virtual type=physical
[*] }
步骤二: 编译你想要监控的那台windows主机的配置文件,假如是win01.cfg,添加如下:
[*]define service{
[*] use generic-service
[*] host_name kknew9
[*] service_description Memory Usage
[*] check_command CheckMEM
[*] }
步骤三:保存重启nagios,即可
附图 nrpe 关于内存监控(checkmem)的一些相关参数说明:
页:
[1]