Monitor gebruikspercentage tabelcache van MySQL-server

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

Knowledge Base article:

Samenvatting

Het percentage van de tabelcache dat momenteel wordt gebruikt. De tabelcache in MySQL-server bevat bestandsbeschrijvingen voor momenteel geopende tabellen. Als een tabel niet in de cache wordt gevonden, wordt de tabel in de cache geladen en weer gesloten als het proces is voltooid. De grootte van de tabelcache wordt bepaald met de variabele table_cache. De monitordrempelwaarde wordt geanalyseerd tegen het gemiddelde van de waarden die in peilingen aan de agent worden geretourneerd. De parameter Aantal steekproeven bepaalt het aantal steekproeven dat bij de berekening van het gemiddelde wordt opgenomen.

Oorzaken

Een slechte status geeft aan dat het gebruikspercentage van de tabelcache hoog is. De tabelcache heeft mogelijk onvoldoende ruimte om alle tabellen te bevatten die worden geopend.

Oplossingen

Als u een hoog gebruikspercentage van de tabelcache wilt verhelpen, wijzigt u de waarde van de variabele table_cache voor de grootte van de tabelcache.

Configuratie

Standaardconfiguratie

Parameter

Standaardwaarde

Waarschuwingsdrempel

Groter dan 85

Drempelwaarde voor fouten

Groter dan 95

Aantal steekproeven

3

Met onderdrukkingen kunnen de hierboven gedefinieerde parameterwaarden worden gewijzigd voor alle exemplaren of voor specifieke exemplaren of groepen.

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
Gebruikspercentage tabelcache van MySQL-server
Het huidige gebruikspercentage ({0}\%) van de tabelcache voor de MySQL-server is hoog
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.MySQLServer.ManagedServer.Unix.TableCacheUsePct.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.TableCacheUsePct.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 Cache Use 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(.)='TableCacheUsePct']$</Value>
<WarningThreshold>85</WarningThreshold>
<ErrorThreshold>95</ErrorThreshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>