Monitor wartości procentowej rywalizacji o blokadę tabel serwera MySQL

Microsoft.MySQLServer.ManagedServer.Unix.TableLockContentionPct.Monitor (UnitMonitor)

Knowledge Base article:

Podsumowanie

Wartość procentowa liczby oczekiwań na uzyskanie blokady tabeli MyISAM w porównaniu do liczby żądań blokad. Dla tabel MyISAM, MEMORY i MERGE serwer MySQL używa blokad na poziomie tabeli. Próg monitora jest analizowany w odniesieniu do średnich wartości zwracanych w sondach do agenta, gdzie parametr Liczba próbek określa liczbę próbek uwzględnionych podczas obliczania średniej.

Przyczyny

Zła kondycja oznacza, że wartość procentowa rywalizacji o blokadę tabel jest wysoka. Liczba wymaganych oczekiwań, zanim blokada tabeli zostanie przyznana, jest zbyt wysoka.

Rozwiązania

Aby rozwiązać problemy związane ze zbyt dużą wartością procentową rywalizacji o blokadę tabeli, wykonaj następujące czynności:

Konfiguracja

Konfiguracja domyślna

Parametr

Wartość domyślna

Próg ostrzeżenia

Większy niż 45

Próg błędu

Większy niż 55

Liczba próbek

3

W celu zmiany wartości parametrów zdefiniowanych powyżej dla wszystkich lub określonych wystąpień bądź grup można zastosować zastąpienia.

Element properties:

TargetMicrosoft.MySQLServer.ManagedServer.Unix
Parent MonitorMicrosoft.MySQLServer.TableCachePerformanceRollup
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Oss.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Wartość procentowa rywalizacji o blokadę pamięci podręcznej tabel serwera MySQL
Bieżąca wartość procentowa rywalizacji o blokadę tabel ({0}\%) dla serwera MySQL jest wysoka
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.MySQLServer.ManagedServer.Unix.TableLockContentionPct.Monitor" Accessibility="Public" Target="Microsoft.MySQLServer.ManagedServer.Unix" TypeID="Oss!Microsoft.Oss.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType" Enabled="onStandardMonitoring" ParentMonitorID="Microsoft.MySQLServer.TableCachePerformanceRollup">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.MySQLServer.ManagedServer.Unix.TableLockContentionPct.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>Table Lock Contention 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(.)='TableLockContentionPct']$</Value>
<WarningThreshold>45</WarningThreshold>
<ErrorThreshold>55</ErrorThreshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>