将 [modules]部分的所有模块前面的注释都去掉,除了CheckWMI.dll and RemoteConfiguration.dll这两个
|
在[Settings]部分设置'password'选项来设置密码,作用是在nagios连接过来时要求提供密码.这一步是可选的,我这里方便起见跳过它,不要密码.
|
将[Settings]部分'allowed_hosts'选项的注释去掉,并且加上运行nagios的监控主机的IP.我改为如下这样
allowed_hosts=127.0.0.1/32,192.168.0.111
以逗号相隔.这个地方是支持子网的,如果写成
192.168.0.0/24则表示该子网内的所有机器都可以访问.如果这个地方是空白则表示所有的主机都可以连接上来.注意是[Settings]部分的,因为[NSClient]部分也有这个选项.
|
必须保证[NSClient]的'port'选项并没有被注释,并且它的值是'12489',这是NSClient的默认监听端口
|
########################################################################
#
# 2007.9.6 add by yahoon
# CHECK_NT
# check windows hosts info
#
########################################################################
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
|
define service{
host_name yahoon
service_description check-version
check_command check_nt!CLIENTVERSION
max_check_attempts 5
normal_check_interval 3
retry_check_interval 2
check_period 24x7
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
contact_groups sagroup
}
|
2007-09-06 10:38:35: error:.\PDHCollector.cpp:69: Getting counter info...
2007-09-06 10:38:35: error:.\PDHCollector.cpp:97:
Detected language: 0x0804 but it could not be found in: counters.defs
2007-09-06 10:38:35: error:.\PDHCollector.cpp:98:
You need to manually configure performance counters!
|
[0x0804]
Description = "Chinese"
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"
|
2007-09-06 12:32:37: error:.\PDHCollector.cpp:69: Getting counter info...
2007-09-06 12:32:37: error:.\PDHCollector.cpp:119: Attempting to open counter...
2007-09-06 12:32:38: error:.\PDHCollector.cpp:122: Counters opend...
|
本文出自 “yahoon的小屋” 博客,谢绝转载!