Microsoft.Windows.WmiRawPerfCounterProbe
Applies To: Operations Manager 2007 R2
The Microsoft.Windows.WmiRawPerfCounterProbe module is a native probe action module type that is used to query Windows Management Instrumentation (WMI) for raw performance counter data and return the information as a System.Performance.BaseData type.
Usage
Use this module when you want to query raw performance counter data from a specific WMI performance counter class. Usually, you will not use this module directly and instead will use the Microsoft.Windows.WmiRawPerfCounterProvider data source module.
Type Definition
<ProbeActionModuleType ID="Microsoft.Windows.WmiRawPerfCounterProbe" Accessibility="Public">
<Configuration>
<xsd:element name="NameSpace" type="xsd:string" />
<xsd:element name="WMIClass" type="xsd:string" />
<xsd:element name="WhereClause" type="xsd:string" />
<xsd:element name="ObjectName" type="xsd:string" />
<xsd:element name="CounterName" type="xsd:string" />
<xsd:element name="InstanceProperty" type="xsd:string" />
<xsd:element name="ValueProperty" type="xsd:string" />
<xsd:element name="ScaleBy" type="xsd:double" minOccurs="0" maxOccurs="1" />
</Configuration>
<ModuleImplementation>
<Native>
<ClassID>F180EFE1-4803-4505-9FE1-ADB3A46F8F20</ClassID>
</Native>
</ModuleImplementation>
<OutputType>Performance!System.Performance.Data</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>
Parameters
The Microsoft.Windows.WmiRawPerfCounterProbe 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. |
WMIClass |
String |
False |
Required parameter. Specifies a valid performance counter WMI class against which to perform the query. |
WhereClause |
String |
False |
Optional parameter. Specifies the SQL |
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. |
InstanceProperty |
String |
False |
Required parameter. The WMI class property that represents a unique identity of an instance. |
ValueProperty |
String |
False |
Required parameter. The WMI class property that supplies the value of the performance data. |
ScaleBy |
Double |
False |
Operations Manager 2007 R2 only. Optional parameter. Specifies the scale value of the raw performance counter value to make that value more readable. |
The Namespace parameter must be a valid WMI namespace that is present on the monitored computer, or the module raises an error in the Operations Manager event log.
The namespace should always specify the computer to connect to as part of the string. If a computer is not specified, the workflow reads from the local computer, which does not work for agentless monitoring scenarios. The computer name is most commonly passed to the module that is using the $Target notation.
The following code example shows a fully configured Namespace parameter in a workflow that is targeted at the Microsoft.Windows.Computer class type. This example retrieves data from the root\cimv2 WMI namespace.
<NameSpace>\\$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\ROOT\CIMV2</NameSpace>
There is a two-minute time-out for connecting to the WMI namespace.
The WMIClass parameter must be a valid raw performance counter class. For a list of valid WMI classes, see Performance Counter Classes. The following XML sample is a WMI class that is used to represent a computer process:
<WMIClass>Win32_PerfRawData_PerfProc_Process</WMIClass >
The WhereClause, InstanceProperty, and ValueProperty parameters are used to construct the SQL query that is issued to the WMI class. In the following sample, the query will return performance data for the System process.
<WhereClause>Name=”System”</WhereClause>
The InstanceProperty parameter defines which WMI class property value represents a single instance of performance data. The ValueProperty parameter defines which WMI class property to use as the value of the performance data. In the following example, the ThreadCount property will be returned as the performance data. The Name property can distinguish one instance from another.
<InstanceProperty>Name</InstanceProperty>
<ValueProperty>ThreadCount</ValueProperty>
Composition
The Microsoft.Windows.WmiRawPerfCounterProbe module is a native module.
The module connects to the specified WMI namespace by calling IWbemLocator::ConnectServer. If the connection succeeds, it receives a pointer to the IWbemServices interface and calls IWbemServices::ExecQuery to run the query against the specified WMI performance counter data class.
Errors
The errors listed in the following table can occur from within the Microsoft.Windows.WmiRawPerfCounterProbe module.
Exception | Reason |
---|---|
10451 |
The module failed to connect to the WMI namespace. |
10452 |
The module failed to connect to the WMI namespace after a defined number of retries. |
10454 |
The module failed to issue the query and will not able to receive events. |
10455 |
The module encountered an unhandled performance counter type and cannot process the counter. |
10456 |
The module did not return any results from the WMI query. |
10457 |
The module was unable to enumerate the WMI data. |
10458 |
The module cannot initialize due to wrong configuration parameter data. |
Related Modules
Module Type | Usage |
---|---|
Queries WMI for event or instance data and returns the information as a System.PropertyBagData type. This module is a trigger-only module. |
External Module References
The Microsoft.Windows.WmiProbe module is a member of the module described in the following table.
Module Type | Library | Usage |
---|---|---|
Microsoft.Windows.Library |
Queries WMI and returns the results as System.Discovery.Data type data. |
Remarks
The Microsoft.Windows.WmiRawPerfCounterProbe module supports only the following counter types:
PERF_COUNTER_RAWCOUNT
PERF_COUNTER_LARGE_RAWCOUNT
PERF_100NSEC_TIMER_INV
PERF_100NSEC_TIMER
A counter of any other type will generate an error.
Sample
The following example shows how the Microsoft.Windows.WmiRawPerfCounterProbe module is used from within a DataSourceModuleType definition.
<DataSourceModuleType ID="Microsoft.Windows.WmiRawPerfCounterProvider" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element name="NameSpace" type="xsd:string" />
<xsd:element name="WMIClass" type="xsd:string" />
<xsd:element name="WhereClause" type="xsd:string" />
<xsd:element name="ObjectName" type="xsd:string" />
<xsd:element name="CounterName" type="xsd:string" />
<xsd:element name="InstanceProperty" type="xsd:string" />
<xsd:element name="ValueProperty" type="xsd:string" />
<xsd:element name="ScaleBy" type="xsd:double" minOccurs="0" maxOccurs="1" />
<xsd:element name="Frequency" type="xsd:unsignedInt" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="Scheduler" TypeID="System!System.Scheduler">
<Scheduler>
<SimpleReccuringSchedule>
<Interval Unit="Seconds">$Config/Frequency$</Interval>
</SimpleReccuringSchedule>
<ExcludeDates />
</Scheduler>
</DataSource>
<ProbeAction ID="Probe" TypeID="Microsoft.Windows.WmiRawPerfCounterProbe">
<NameSpace>$Config/NameSpace$</NameSpace>
<WMIClass>$Config/WMIClass$</WMIClass>
<WhereClause>$Config/WhereClause$</WhereClause>
<ObjectName>$Config/ObjectName$</ObjectName>
<CounterName>$Config/CounterName$</CounterName>
<InstanceProperty>$Config/InstanceProperty$</InstanceProperty>
<ValueProperty>$Config/ValueProperty$</ValueProperty>
<ScaleBy>$Config/ScaleBy$</ScaleBy>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="Probe">
<Node ID="Scheduler" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>Performance!System.Performance.Data</OutputType>
</DataSourceModuleType>
Information
Module Type |
|
Input Type |
None |
Output Type |
|
Implementation |
Native |
Library |
Microsoft.Windows.Library |