正在中止的 MySQL Server 连接的百分比。客户端应用程序的登录凭据无效或登录超时可能导致连接中止。此监视器从状态变量“Aborted_connects”获取中止的连接数量,然后除以状态变量“Connections”。
运行不正常状态表示 MySQL Server 上中止的连接的百分比高。这可能是由以下问题引起的:
连接到数据库时使用了错误权限
客户端程序退出前未关闭连接
连接包所花时间超出全局变量 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>