標籤:
這個問題是在測試中發現的。因為要在伺服器上布置nagios用來監控oracle,可是發現手動shutdown資料庫後能夠很快警示,但是再startup後就不是很及時,有時會延遲很久。經過研究發現了這個情況,現貼出來與大家分享。
注意看那個類似雲朵的表徵圖,那個就是在提示狀態抖動,也就是flapping state檢測開啟了。而一旦開啟,就會temporarily suppres notifications。
警示延遲是由於host or service狀態不穩定,nagios稱之為flapping state
在nagios的主設定檔nagios.cfg中,有如下內容:
# FLAP DETECTION OPTION
# This option determines whether or not Nagios will try
# and detect hosts and services that are "flapping".
# Flapping occurs when a host or service changes between
# states too frequently. When Nagios detects that a
# host or service is flapping, it will temporarily suppress
# notifications for that host/service until it stops
# flapping. Flap detection is very experimental, so read
# the HTML documentation before enabling this feature!
# Values: 1 = enable flap detection
# 0 = disable flap detection (default)
enable_flap_detection=0#雖然文檔裡說預設是0,但實際為1.改為0之後就解決了flapping state,並且解決了臨時suppress notifications的問題
# FLAP DETECTION THRESHOLDS FOR HOSTS AND SERVICES
# Read the HTML documentation on flap detection for
# an explanation of what this option does. This option
# has no effect if flap detection is disabled.
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
nagios警示延遲的解決--flapping state