將 [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...
|