Microsoft.Windows.WmiPerfCounterProvider
Applies To: Operations Manager 2007 R2
The Microsoft.Windows.WmiPerfCounterProvider module is a data source module type that is used to query Windows Management Instrumentation (WMI) for performance counter data at the specified frequency and returns the information as a System.Performance.BaseData type.
Usage
Use this module when you want to query performance counter data from a specific WMI performance counter class at a set frequency.
Type Definition
<DataSourceModuleType ID="Microsoft.Windows.WmiPerfCounterProvider" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element name="NameSpace" type="xsd:string" />
<xsd:element name="Query" type="xsd:string" />
<xsd:element name="Frequency" type="xsd:unsignedInt" />
<xsd:element name="ObjectName" type="xsd:string" />
<xsd:element name="CounterName" type="xsd:string" />
<xsd:element name="InstanceName" type="xsd:string" />
<xsd:element name="Value" type="xsd:string" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="Microsoft.Windows.WmiProvider">
<NameSpace>$Config/NameSpace$</NameSpace>
<Query>$Config/Query$</Query>
<Frequency>$Config/Frequency$</Frequency>
</DataSource>
<ConditionDetection ID="Mapper" TypeID="Performance!System.Performance.DataGenericMapper">
<ObjectName>$Config/ObjectName$</ObjectName>
<CounterName>$Config/CounterName$</CounterName>
<InstanceName>$Config/InstanceName$</InstanceName>
<Value>$Config/Value$</Value>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="Mapper">
<Node ID="DS" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>Performance!System.Performance.Data</OutputType>
</DataSourceModuleType>
Parameters
The Microsoft.Windows.WmiPerfCounterProvider module supports the configuration parameters described in the following table.
Parameter | Type | Overrideable | Description |
---|---|---|---|
Namespace |
String |
False |
Required parameter. Specifies the WMI namespace within which the module is to run the query. |
Query |
String |
False |
Required parameter. Specifies the SELECT WMI query to run. |
Frequency |
String |
True |
Required parameter. Specifies the frequency, in seconds, at which the module will query new performance counter data. |
ObjectName |
String |
False |
Required parameter. The name of the object against which the performance counter is measured. |
CounterName |
String |
False |
Required parameter. The name of the performance counter. |
InstanceName |
String |
False |
Required parameter. Contains the instance name but can be empty if there is only a single instance. |
Value |
String |
False |
Required parameter. Contains the numeric value for the performance value. |
For more information about the Namespace parameter, see the Microsoft.Windows.WmiProbe module.
The Query parameter must run a SELECT
query against a valid performance counter class. For a list of valid WMI classes, see Performance Counter Classes.
For more information about the CounterName, ObjectName, InstanceName, and Value parameters, see System.Performance.DataGenericMapper.
Composition
The Microsoft.Windows.WmiPerfCounterProvider module is a composite module that contains the member modules described in the following table.
Workflow Run Order | Module Type | Usage |
---|---|---|
1 |
Queries a WMI namespace at a scheduled frequency and returns the results as System.PropertyBagData type data. |
|
2 |
Maps the incoming System.PropertyBagData type to the System.Performance.BaseData type and returns the performance data. |
Related Modules
Module Type | Usage |
---|---|
Queries WMI for raw performance counter data at the specified frequency and returns the information as a System.Performance.BaseData type. |
External Module References
None.
Sample
The following XML example shows how the Microsoft.Windows.WmiPerfCounterProvider module is used to collect Web service performance data and store it into the Operations Manager database and data warehouse.
<Rule ID="WmiPerfCounterProviderRule" Enabled="true" Target="Windows!Microsoft.Windows.Server.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.WmiPerfCounterProvider">
<NameSpace>root\cimv2</NameSpace>
<Query>select GetRequestsPerSec from Win32_PerfFormattedData_W3SVC_WebService</Query>
<Frequency>30</Frequency>
<ObjectName>IISCurrentConnections_WinSrv</ObjectName>
<CounterName>CurrentConnections</CounterName>
<InstanceName>NULL</InstanceName>
<Value>$Data/Property[@Name='GetRequestsPerSec']$</Value>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />
</WriteActions>
</Rule>
Information
Module Type |
|
Input Type |
None |
Output Type |
|
Implementation |
Native |
Library |
Microsoft.Windows.Library |