MySQL 伺服器目前的中止連線率。連線遭中止可能起因於用戶端應用程式的登入認證無效或發生逾時。此監視器會從狀態變數 'Aborted_connects' 擷取中止的連線數,再將其除以狀態變數 'Connections'。
狀況不良狀態表示 MySQL 伺服器目前的中止連線率高。這可能是下列問題所致:
連線到資料庫時使用了不正確的權限
用戶端程式未先結束即關閉連線
連線封包花費的時間比全域變數 connect_timeout 長
連線封包的格式不正確
連線封包的大小大於全域變數 max_allowed_packet
TCP/IP 設定不正確
若要解決中止連線數高的狀況,請選擇下列一或多個選項:
指定用戶端程式所能使用的權限
確認用戶端程式正確地終止了 mysql 連線
提高全域變數 connect_timeout
提高全域變數 max_allowed_packet
預設設定
參數 | 預設值 |
警告閾值 | 大於 15 |
錯誤閾值 | 大於 30 |
樣本數 | 3 |
您可以使用上列定義的覆寫,變更所有執行個體或特定執行個體或群組的參數值。
Target | Microsoft.MySQLServer.ManagedServer.Unix | ||
Parent Monitor | Microsoft.MySQLServer.ConnectionsPerformanceRollup | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Oss.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.MySQLServer.ManagedServer.Unix.AbortedConnectionPct.Monitor" Accessibility="Public" Target="Microsoft.MySQLServer.ManagedServer.Unix" TypeID="Oss!Microsoft.Oss.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType" Enabled="onStandardMonitoring" ParentMonitorID="Microsoft.MySQLServer.ConnectionsPerformanceRollup">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.MySQLServer.ManagedServer.Unix.AbortedConnectionPct.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Value$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState HealthState="Success" MonitorTypeStateID="StatusOK" ID="UnderThreshold"/>
<OperationalState HealthState="Warning" MonitorTypeStateID="StatusWarning" ID="OverWarningThreshold"/>
<OperationalState HealthState="Error" MonitorTypeStateID="StatusError" ID="OverErrorThreshold"/>
</OperationalStates>
<Configuration>
<Interval>300</Interval>
<TargetSystem>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/MySQL_ServerStatistics?__cimnamespace=root/mysql</Uri>
<WSManFilter/>
<ObjectName>MySQL Server</ObjectName>
<CounterName>Aborted Connection Pct</CounterName>
<InstanceXPath>/DataItem/WsManData/*[local-name(.)='MySQL_ServerStatistics']/*[local-name(.)='InstanceID']</InstanceXPath>
<InstanceName>$Target/Property[Type="Microsoft.MySQLServer.Installation"]/InstanceID$</InstanceName>
<Value>$Data/WsManData/*[local-name(.)='MySQL_ServerStatistics']/*[local-name(.)='AbortedConnectionPct']$</Value>
<WarningThreshold>15</WarningThreshold>
<ErrorThreshold>25</ErrorThreshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>