NSC.ini 設定檔。
; Script to check external scripts and/or internal aliases.
CheckExternalScripts.dll
若要 Linux nagios Server 使用 NRPE 來監測 Windows client,則要開啟
# ./check_nrpe -H 192.168.1.1 -p 5666 -c alias_cpu


;# USE THIS FILE
;  Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry
is set to 1
;  the registry will be used instead.
use_file=1
allowed_hosts=192.168.1.2
password=abc123
NSClient 允許連線的主機 IP 及密碼。(使用 check_nt)

;# LOG DEBUG
;  Set to 1 if you want debug message printed in the log file (debug messages are always
printed to stdout when run with -test)
debug=1
開啟 log 紀錄 debug message 的功能


[NRPE]
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify
arguments to commands that are executed.
allow_arguments=1
開啟命令可自行彈性輸入參數的功能
# ./check_nrpe -H 192.168.1.1 -p 5666 -c checkServiceState -a CheckAll

;# USE SSL SOCKET
;  This option controls if SSL should be used on the socket.
use_ssl=1
使用 SSL 傳輸

[External Script]
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify
arguments to commands that are executed.
allow_arguments=1
開啟命令可使用 External Alias 中的功能
# ./check_nrpe -H 192.168.1.1 -p 5666 -c alias_cpu

[External Alias]
alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual
type=paged type=page
alias_up=checkUpTime MinWarn=1d MinWarn=1h

alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_disk_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-
unreadable
alias_volumes=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
alias_volumes_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
ignore-unreadable

alias_service=checkServiceState CheckAll
alias_service_ex=checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver
HPZ12" exclude=stisvc
alias_process=checkProcState "$ARG1$=started"
alias_process_stopped=checkProcState "$ARG1$=stopped"
alias_process_count=checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"
alias_process_hung=checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"

alias_event_log=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1
"filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source !=
'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%
count%)"

alias_file_size=CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1
"syntax=%filename% %size%" max-dir-depth=10
alias_file_age=checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1
"syntax=%filename% %write%"

alias_sched_all=CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
alias_sched_long=CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -
$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_sched_task=CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%
title% (%most_recent_run_time%)" warn=>0

alias_updates=check_updates -warning 0 -critical 0

check_ok=CheckOK Everything is fine!

flyfox 發表在 痞客邦 PIXNET 留言(0) 人氣()