目錄 |
ACE運行狀況監控概述
本節介紹ACE上的運行狀況監控。
ACE使用探測器作為帶外(OOB)運行狀況監控來跟蹤伺服器的狀態。預設情況下,ACE中未配置任何探測器。ACE驗證伺服器對探測的響應(或者根本沒有響應),以檢查是否存在可能阻止客戶端到達伺服器的任何網路或應用問題。根據伺服器響應,ACE可以將伺服器置於服務中或服務外,並可做出可靠的負載均衡決策。
還可以使用運行狀況監控來檢測高可用性(冗餘)配置中的網關或主機的故障。如需詳細資訊,請參閱思科應用控制引擎模組管理指南。
ACE通過按如下方式標籤探測器來評估伺服器的運行狀況:
- Passed — 伺服器返回有效的響應。
- Failed — 伺服器無法向ACE提供有效響應,並且ACE無法到達伺服器進行指定次數的重試。
通過配置ACE進行運行狀況監控,ACE定期傳送活動探測器以確定伺服器狀態。ACE支援4096個唯一的探測器配置,其中包括ICMP、TCP、HTTP和其他預定義的運行狀況探測器。ACE一次只能執行最多200個併發指令碼探測。ACE還允許同時開啟2048插槽。
可以將同一探測與多個實際伺服器或伺服器群相關聯。每次再次使用同一探測器時,ACE都會將其計為另一個探測器例項。您最多可以分配16,000個探測例項。
ACE還支援帶內運行狀況監控功能(預設情況下禁用),該功能可跟蹤伺服器群中實際伺服器上的連線故障:
- 對於TCP,從伺服器重置(RST)或SYN超時
- 對於UDP、ICMP主機、網路、埠、協定和源路由不可達消息
![]()
當您配置故障計數閾值並且這些故障數在重置時間間隔內超過閾值時,ACE會立即將伺服器標籤為發生故障,使其退出服務,並從負載平衡中將其刪除。在可選恢復服務間隔到期之前,不會考慮對伺服器進行負載均衡。
有關帶內運行狀況監控的詳細資訊,請參閱思科應用控制引擎模組伺服器負載平衡指南。
探測型別
- ICMP探測
— 傳送回應請求
— 需要回顯回覆
- 通用TCP探測
— 如果需要,可使用TCP RST關閉TCP探測
- 通用UDP探測
- HTTP探測
- HTTPS探測
- FTP探測
- Telnet探測
- SMTP探測
- POP3探測
- IMAP探測
- SIP探測
- RTSP探測
- Radius探測
配置探測
您可以在ACE上配置運行狀況探測器,以主動建立連線並將流量顯式傳送到伺服器。探測器根據伺服器的響應來確定伺服器的運行狀況是經過還是失敗。
配置活動探測器是一個三步過程:
1.使用名稱、型別和屬性配置運行狀況探測。
2.將探測器與以下任一方法關聯:
-
- 真正的伺服器。
-
- 特定伺服器群中的實際伺服器例項。可以將單個或多個探測器與伺服器場中的實際伺服器相關聯。
-
- 伺服器群。伺服器場中的所有伺服器都接收相關探測型別的探測。
3.啟用真正的伺服器或伺服器群。
有關詳細資訊,請參閱思科應用控制引擎模組伺服器負載平衡指南。
探測配置示例
以下示例顯示一種運行配置,該配置可在多個實際伺服器之間對DNS流量進行負載均衡,並傳輸和接收跨多個資料包的UDP資料。該配置使用UDP運行狀況探測。
access-list ACL1 line 10 extended permit ip any any
probe udp UDP
interval 5
passdetect interval 10
description THIS PROBE IS INTENDED FOR LOAD BALANCING DNS TRAFFIC
port 53
send-data UDP_TEST
rserver host SERVER1
ip address 192.168.10.45
inservice
rserver host SERVER2
ip address 192.168.10.46
inservice
rserver host SERVER3
ip address 192.168.10.47
inservice
serverfarm host SFARM1
probe UDP
rserver SERVER1
inservice
rserver SERVER2
inservice
rserver SERVER3
inservice
class-map match-all L4UDP-VIP_114:UDP_CLASS
2 match virtual-address 192.168.120.114 udp eq 53
policy-map type loadbalance first-match L7PLBSF_UDP_POLICY
class class-default
serverfarm SFARM1
policy-map multi-match L4SH-Gold-VIPs_POLICY
class L4UDP-VIP_114:UDP_CLASS
loadbalance vip inservice
loadbalance policy L7PLBSF_UDP_POLICY
loadbalance vip icmp-reply
nat dynamic 1 vlan 120
connection advanced-options 1SECOND-IDLE
interface vlan 120
description Upstream VLAN_120 - Clients and VIPs
ip address 192.168.120.1 255.255.255.0
fragment chain 20
fragment min-mtu 68
access-group input ACL1
nat-pool 1 192.168.120.70 192.168.120.70 netmask 255.255.255.0 pat
service-policy input L4SH-Gold-VIPs_POLICY
no shutdown
ip route 10.1.0.0 255.255.255.0 192.168.120.254
排除ACE運行狀況監控故障
本節介紹如何解決常見探測器配置問題。
基本探測功能故障排除
要檢查基本探測器故障排除的最重要命令輸出是show probe detail:
ACE_module5/Admin# show probe detail
probe : icmp-probe
type : ICMP, state : ACTIVE
description :
----------------------------------------------
port : 0 address : 0.0.0.0 addr type : -
interval : 10 pass intvl : 10 pass count : 3
fail count: 5 recv timeout: 5
--------------------- probe results --------------------
probe association probed-address probes failed passed health
------------------- ---------------+----------+----------+----------+-------
rserver : rs1
10.7.107.51 230 6 224 FAILED
Socket state : RESET
No. Passed states : 1 No. Failed states : 1
No. Probes skipped : 0 Last status code : 0
Last disconnect err : Host Unreachable, no route found to destination
Last probe time : Sat Feb 18 18:24:18 2006
Last fail time : Sat Feb 18 18:24:08 2006
Last active time : Sat Feb 18 17:46:08 2006
- 探測運行狀況:"INIT"、"FAILED"、"PASSED"、"DISABLED"
- 套接字狀態:"RESET"、"OPENING"、"RECEIVING"、"CLOSED"
- 上次結束通話錯誤:泛型或探測型別特定的故障消息:
- 「Connection reset by server(伺服器重置連線)」
- "伺服器拒絕連線"
— 「無法識別或無效的響應」
- "伺服器開啟超時(無SYN ACK)"
- "伺服器回覆超時(無回覆)"
— 「Expect status code mismatch」
— 「Received invalid status code」
- "內部錯誤:指令碼由於超時而終止」
- "ICMP內部錯誤:無空間,傳輸路徑已滿」
- "內部錯誤:無法建立SSL會話」
- 「Received ICMP Stale pkt」
- ...
疑難排解TCP探測錯誤
show probe detail輸出中的「Socket State」和「Last disconnect err」欄位應該提供大部分所需的資訊。檢視此內容,同時檢視探測流量的監聽器追蹤。
排除UDP探測錯誤
show probe detail輸出中的「Socket State」和「Last disconnect err」欄位應該提供大部分所需的資訊。檢視此內容,同時檢視探測流量的監聽器追蹤。
疑難排解HTTP探測錯誤
在第一個場景中,您配置了HTTP探測,但實際伺服器的運行狀況顯示為FAILED,並且Last disconnect err欄位指示接收到無效狀態代碼,如show probe detail命令輸出中所示。您已經檢查了伺服器,並且伺服器已啟動並正在運行。伺服器上的封包擷取也顯示一切正常。問題出在哪裡?
1.通過輸入以下命令顯示探測狀態詳細資訊:
ACE_module5/Admin# show probe detail
probe : HTTP_PROBE
type : HTTP
state : ACTIVE
description :
----------------------------------------------
port : 80 address : 0.0.0.0 addr type : -
interval : 10 pass intvl : 10 pass count : 3
fail count: 3 recv timeout: 10
http method : GET
http url : /
conn termination : GRACEFUL
expect offset : 0 , open timeout : 1
expect regex : -
send data : -
------------------ probe results ------------------
associations ip-address port porttype probes failed passed health
------------ ---------------+-----+--------+--------+--------+--------+------
rserver : SERVER1
192.168.10.45 80 -- 2 2 0 FAILED
Socket state : CLOSED
No. Passed states : 0 No. Failed states : 1
No. Probes skipped : 0 Last status code : 200 <------- Last status code from server
No. Out of Sockets : 0 No. Internal error: 0
Last disconnect err : Received invalid status code <-------
Last probe time : Tue Apr 7 16:17:26 2009
Last fail time : Tue Apr 7 16:17:16 2009
Last active time : Never
Last disconnect err欄位表示ACE收到無效狀態代碼。此錯誤表示您尚未為探測配置expect status命令。
2.通過輸入以下命令確認此查詢結果:
ACE_module5/Admin# show running-config probe Generating configuration.... probe http HTTP_PROBE interval 10 passdetect interval 10 open 1
3.輸入以下命令糾正問題:
ACE_module5/Admin# config Enter configuration commands, one per line. End with CNTL/Z. ACE_module5/Admin(config)# probe http HTTP_PROBE ACE_module5/Admin(config-probe-http)# expect status 200 200 <------- 200 indicates the 200 OK message from the server ACE_module5/Admin(config-probe-http)# end
4.輸入以下命令確認配置:
ACE_module5/Admin# show running-config probe Generating configuration.... probe http HTTP_PROBE interval 10 passdetect interval 10 expect status 200 200 open 1
5.再次顯示探測狀態詳細資訊,並通過輸入以下命令觀察伺服器運行狀況值為SUCCESS:
ACE_module5/Admin# show probe HTTP_PROBE detail
probe : HTTP_PROBE
type : HTTP
state : ACTIVE
description :
----------------------------------------------
port : 80 address : 0.0.0.0 addr type : -
interval : 10 pass intvl : 10 pass count : 3
fail count: 3 recv timeout: 10
http method : GET
http url : /
conn termination : GRACEFUL
expect offset : 0 , open timeout : 1
expect regex : -
send data : -
------------------ probe results ------------------
associations ip-address port porttype probes failed passed health
------------ ---------------+-----+--------+--------+--------+--------+------
rserver : SERVER1
192.168.10.45 80 -- 24 15 9 SUCCESS
Socket state : CLOSED
No. Passed states : 1 No. Failed states : 1
No. Probes skipped : 0 Last status code : 200
No. Out of Sockets : 0 No. Internal error: 0
Last disconnect err : - <------- No error indicated now. The probe is successful.
Last probe time : Tue Apr 7 16:21:05 2009
Last fail time : Tue Apr 7 16:17:16 2009
Last active time : Tue Apr 7 16:20:05 2009
疑難排解HTTPS探測錯誤
除了排除HTTP探測錯誤故障的方法之外,使用SSL統計資訊排除HTTPS探測故障。HTTPS探測流量在管理虛擬上下文中運行,因此在該上下文中檢視show stats crypto client命令的輸出。
與所有其他探測器不同,HTTPS探測器在ACE的資料平面中運行。因此,它們需要對ACE上的SSL流量進行資源分配。
疑難排解SNMP探測問題
在此案例中,您配置了SNMP探測,但「上次斷開連線錯誤」欄位表明權重之和沒有達到最大權重值,如show probe detail命令輸出中所示。
1.通過輸入以下命令顯示探測狀態詳細資訊:
ACE_module5/test# show probe detail
probe : SNMP_PROBE
type : SNMP
state : ACTIVE
description : snmp probe
----------------------------------------------
port : 161 address : 0.0.0.0 addr type : -
interval : 15 pass intvl : 10 pass count : 3
fail count: 3 recv timeout: 10
version : 2c community : test_comm
oid string #1 : .1.3.6.1.2.1.4.3.0
type : ABSOLUTE max value : 1000000000
weight : 10000 threshold : 1000000000
------------------ probe results ------------------
associations ip-address port porttype probes failed passed health
------------ ---------------+-----+--------+--------+--------+--------+------
serverfarm : least-loaded, predictor least-loaded
real : SERVER1[0]
192.168.10.45 161 -- 0 0 0 INIT
Socket state : CLOSED
No. Passed states : 0 No. Failed states : 0
No. Probes skipped : 0 Last status code : 0
No. Out of Sockets : 0 No. Internal error: 30
Last disconnect err : Sum of weights don't add up to max weight value <------- Error condition
Last probe time : Never
Last fail time : Never
Last active time : Never
Server load : 16000 <------- Note the server load value
出現此錯誤的原因在於,如果您為單個探測配置了多個OID,並且如果要為特定OID提供優先順序,則需要從這些OID配置weight命令。
權重的合計應等於16000(請參見Server Load欄位)。 對於單個OID,weight命令沒有任何意義。
2.通過輸入以下命令顯示探測配置:
ACE_module5/Admin# show running-config probe
probe snmp SNMP_PROBE
description snmp probe
port 161
interval 15
passdetect interval 10
version 2c
community TEST_COMM
oid .1.3.6.1.2.1.4.3.0
type absolute max 1000000000
weight 10000 <-------
在以上配置中,權重被配置為10000個單一OID的權重。ACE預期在探測器中配置另一個OID,兩個權重之和應等於16000。
配置不完整,ACE在探測配置中需要其他引數。由於配置中沒有另一個OID,因此ACE無法計算負載,這就是出現「權重之和不加到最大權重值」錯誤消息的原因。
3.通過修改探測配置來解決問題,如下所示:
probe snmp SNMP_PROBE
description test
port 161
interval 15
passdetect interval 60
version 2c
community test_comm
oid .1.3.6.1.2.1.4.3.0
type absolute max 1000000000
weight 10000
oid .1.3.6.1.2.1.4.10.0
type absolute max 1000000000
weight 6000 <------- 10000 + 6000 = 16000
4.通過輸入以下命令再次顯示探測狀態詳細資訊:
ACE_module5/test# show probe SNMP_PROBE detail
probe : snmp1
type : SNMP
state : ACTIVE
description : snmp probe
----------------------------------------------
port : 161 address : 0.0.0.0 addr type : -
interval : 15 pass intvl : 10 pass count : 3
fail count: 3 recv timeout: 10
version : 2c community : test_comm
oid string #1 : .1.3.6.1.2.1.4.3.0
type : ABSOLUTE max value : 1000000000
weight : 10000 threshold : 1000000000
oid string #2 : .1.3.6.1.2.1.4.10.0
type : ABSOLUTE max value : 1000000000
weight : 6000 threshold : 1000000000
------------------ probe results ------------------
associations ip-address port porttype probes failed passed health
------------ ---------------+-----+--------+--------+--------+--------+------
serverfarm : least-loaded, predictor least-loaded
real : SERVER1[0]
192.168.10.45 161 -- 4143 0 4143 SUCCESS
Socket state : CLOSED
No. Passed states : 1 No. Failed states : 0
No. Probes skipped : 0 Last status code : 0
No. Out of Sockets : 0 No. Internal error: 0
Last disconnect err : - <------- No error indicated now. The probe is successful.
Last probe time : Mon Apr 6 09:12:54 2009
Last fail time : Never
Last active time : Sun Apr 5 15:57:28 2009
Server load : 0
使用最後狀態代碼欄位
可以為非簡單探測器提供有關最後狀態代碼欄位的詳細資訊。例如,對於指令碼式探測器PROBENTICE_PROBE,狀態代碼30001表示探測器成功,值30002表示探測器引數中存在錯誤。狀態代碼30002的最後一個斷開連線錯誤顯示「Did not receive corresponse from the server」,但實際問題與探測配置中的引數相關,可以通過檢視探測的指令碼來檢查該引數。
ACE_module5/Admin# show probe TEST detail
probe : TEST
type : SCRIPTED
state : ACTIVE
description :
----------------------------------------------
port : 0 address : 0.0.0.0 addr type : -
interval : 15 pass intvl : 20 pass count : 3
fail count: 3 recv timeout: 10
script filename : PROBENOTICE_PROBE
--------------------- probe results --------------------
probe association probed-address probes failed passed health
------------------- ---------------+----------+----------+----------+-------
serverfarm : sf1
real : rs2[0]
23.0.0.5 4082 54 4028 SUCCESS
Socket state : RESET
No. Passed states : 6 No. Failed states : 5
No. Probes skipped : 8 Last status code : 30001 <------- Indicates success
No. Out of Sockets : 0 No. Internal error: 0
Last disconnect err : -
Last probe time : Wed Apr 8 04:44:41 2009
Last fail time : Tue Apr 7 12:02:10 2009
Last active time : Tue Apr 7 12:03:45 2009
修訂記錄
| 修訂 | 發佈日期 | 意見 |
|---|---|---|
1.0 |
July 15, 2026
|
初始版本 |