Collecte du pourcentage d'utilisation des connexions du serveur MySQL

Microsoft.MySQLServer.ManagedServer.Unix.ConnectionsUsePct.Collection (Rule)

Cette règle collecte le pourcentage actuel des connexions utilisées sur le serveur MySQL

Knowledge Base article:

Résumé

Cette règle collecte les données de performances du compteur de performances Serveur MySQL\ Pourcentage d'utilisation des connexions. Les valeurs collectées sont accessibles dans les affichages de performances. Cette mesure expose le pourcentage total de connexions actuellement utilisées par le serveur MySQL. La valeur retournée par l'agent est calculée en divisant le nombre de connexions actuellement utilisées par le nombre maximum de connexions autorisé.

Element properties:

TargetMicrosoft.MySQLServer.ManagedServer.Unix
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Oss.WSMan.PerfCounterProvider Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.MySQLServer.ManagedServer.Unix.ConnectionsUsePct.Collection" Target="Microsoft.MySQLServer.ManagedServer.Unix" Remotable="true" Enabled="onStandardMonitoring">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Oss!Microsoft.Oss.WSMan.PerfCounterProvider">
<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>
<Filter/>
<SplitItems>true</SplitItems>
<ObjectName>MySQL Server</ObjectName>
<CounterName>Connection Use Pct</CounterName>
<InstanceName>_Total</InstanceName>
<Value>$Data/WsManData/*[local-name(.)='MySQL_ServerStatistics']/*[local-name(.)='ConnectionsUsePct']$</Value>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>