This rule collects the number of bytes used for a MySQL Database
This rule collects performance data for the MySQL Database\ Disk Space in Bytes performance counter. The collected values are accessible in performance views. This metric exposes the total disk space in bytes for a MySQL Database. The value returned by the agent is calculated by summing the diskspace metrics from information_schema for all tables.
Target | Microsoft.MySQLServer.Database.Unix |
Category | PerformanceCollection |
Enabled | True |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Oss.WSMan.PerfCounterProvider.Filtered.TimedEnumerator | Default |
WriteToDB | WriteAction | Microsoft.SystemCenter.CollectPerformanceData | Default |
WriteToDW | WriteAction | Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData | Default |
<Rule ID="Microsoft.MySQLServer.Database.Unix.DiskSpaceInBytes.Collection" Target="Microsoft.MySQLServer.Database.Unix" Remotable="true" Enabled="onStandardMonitoring">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Oss!Microsoft.Oss.WSMan.PerfCounterProvider.Filtered.TimedEnumerator">
<Interval>300</Interval>
<TargetSystem>$Target/Host/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/MySQL_Server_Database?__cimnamespace=root/mysql</Uri>
<Filter/>
<SplitItems>true</SplitItems>
<ObjectName>MySQL Database</ObjectName>
<CounterName>Disk Space in Bytes</CounterName>
<InstanceName>$Target/Property[Type="Microsoft.MySQLServer.Database"]/InstanceID$</InstanceName>
<InstanceProperty>/DataItem/WsManData/*[local-name(.)='MySQL_Server_Database']/*[local-name(.)='InstanceID']</InstanceProperty>
<Value>$Data/WsManData/*[local-name(.)='MySQL_Server_Database']/*[local-name(.)='DiskSpaceInBytes']$</Value>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>