System.Performance.DataProvider
Applies To: Operations Manager 2007 R2
The System.Performance.DataProvider data source module type outputs Windows performance data as System.Performance.Data data on a timed interval.
Usage
This module outputs data at the specified frequency. To return data only when the performance value has changed by a specific amount, consider using the System.Performance.OptimizedDataProvider module type instead.
Type Definition
<DataSourceModuleType ID="System.Performance.DataProvider" Accessibility="Public">
<Configuration>
<xsd:element name="ComputerName" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="CounterName" type="xsd:string" />
<xsd:element name="ObjectName" type="xsd:string" />
<xsd:element name="InstanceName" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="AllInstances" type="xsd:boolean" minOccurs="0" maxOccurs="1" />
<xsd:element name="Frequency" type="xsd:unsignedInt" />
<xsd:element name="ScaleBy" type="xsd:double" minOccurs="0" maxOccurs="1" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" ParameterType="int" Selector="$Config/Frequency$" />
</OverrideableParameters>
<ModuleImplementation>
<Native>
<ClassID>28BE3571-7EDD-42B8-98F8-38171F52A29A</ClassID>
</Native>
</ModuleImplementation>
<OutputType>System.Performance.Data</OutputType>
</DataSourceModuleType>
Parameters
The System.Performance.DataProvider supports the configuration parameters described in the following table.
Parameter | Type | Overrideable | Description |
---|---|---|---|
ComputerName |
String |
False |
Optional parameter. Contains the name of the computer to collect performance data from. |
CounterName |
String |
False |
Required parameter. Specifies the name of the Windows performance counter. |
ObjectName |
String |
False |
Required parameter. Specifies the Windows performance object name. |
InstanceName |
String |
False |
Optional parameter. Contains the Windows performance instance, if applicable. |
AllInstances |
Boolean |
False |
Optional parameter. Specifies whether to collect all instances for a multi-instance counter. Defaults to false. |
Frequency |
Unsigned Integer |
True |
Required parameter. Specifies the interval in seconds between performance data collection. Data might not actually be output from the module on this frequency if optimization is being used. Must be greater than 0. |
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. Defaults to 1.0. |
ComputerName
The ComputerName configuration is most commonly passed to the module that is using the $Target notation, although it can be specified as any string. This module attempts to connect to either the local computer’s event log or a remove event log, depending on the configuration that is passed.
For a workflow that is targeted at a Windows-based computer, the ComputerName element is specified as follows:
<ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
If the target is a class that hosted by a computer, hosting references are added as required. For example:
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
Counter Selection
The CounterName and ObjectName parameters identify the Windows performance counter to collect. The values entered here depend on the performance counters that are running on the computer that is being targeted with the workflow that contains the module. The Windows performance monitor can be used to identify available performance counters.
For example, the following configuration collects the average disk queue length on the logical disk object:
<CounterName>Avg. Disk Queue Length</CounterName>
<ObjectName>LogicalDisk</ObjectName>
The InstanceName and AllInstances parameters specify how to handle counters that have multiple instances. For example, the logical disk counter has an instance in Windows performance monitor for each available logical disk.
You can specify a single instance by using the InstanceName parameter, or you can specify AllInstances. You can specify a single instance as shown in the following example:
<CounterName>Avg. Disk Queue Length</CounterName>
<ObjectName>LogicalDisk</ObjectName>
<InstanceName>C:</InstanceName>
<AllInstances>false</AllInstances>
To specify all instances, leave the InstanceName parameter empty and set the AllInstances parameter to true, as shown in the following example:
<CounterName>Avg. Disk Queue Length</CounterName>
<ObjectName>LogicalDisk</ObjectName>
<InstanceName/>
<AllInstances>true</AllInstances>
For a counter that does not have any instances, leave the InstanceName parameter empty, and set the AllInstances parameter to false, as shown in the following example:
<CounterName>Available MBytes</CounterName>
<ObjectName>Memory</ObjectName>
<InstanceName />
<AllInstances>false</AllInstances>
For multi-instance counters, you might want to collect the performance data against specific object instances in Operations Manager. In this situation, it is common to use a $Target expression for the instance name to collect only the relevant instance for the given discovered object, as shown in the following example:
<CounterName>Avg. Disk sec/Write</CounterName>
<ObjectName>LogicalDisk</ObjectName>
<InstanceName>$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$</InstanceName>
<AllInstances>false</AllInstances>
Composition
The System.Performance.DataProvider module is a native module.
Related Modules
None.
External Module References
The System.Performance.DataProvider module is a member of the public modules described in the following table.
Module Type | Library | Usage |
---|---|---|
System.Performance.Library |
A data source module that has an optimization mode. It will return data only when the data has changed by the amount specified. |
|
System.Performance.Library |
A data source module type that outputs a calculated delta of Windows performance data as System.Performance.Data data on a timed interval. |
Remarks
If a workflow that uses this module type runs on a computer that does not have the counter, warning events are logged in the Operations Manager event log indicating that the performance counter cannot be found. You should use targeting to ensure that your workflows run only on computers that are known to have the counters present. For example, when you collect SQL Server performance data, you should target specific SQL Server classes, such as Microsoft.SQLServer.2005.DBEngine rather than Microsoft.Windows.Computer
It is valid to use $Target properties in the CounterName and ObjectName parameters in addition to the InstanceName parameter. This is required if the object or counter name in the Windows performance monitor is a variable. An example of this is Microsoft SQL Server. The object names have the instance name as part of the name, so it is required to use a discovered property for configuration, as shown in the following example:
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Logins/sec</CounterName>
<ObjectName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:General Statistics</ObjectName>
<InstanceName />
<AllInstances>false</AllInstances>
<Frequency>120</Frequency>
Sample
The following XML sample illustrates a performance collection rule. This rule collects a counter with a single instance on a 15-minute interval, and it writes the data to both the Operations Manager database and the data warehouse.
<Rule ID="Microsoft.Samples.CollectThreads" Target="Microsoft.Samples.ApplicationX">
<Category>Custom</Category>
<DataSources>
<DataSource ID="DS" TypeID="Perf!System.Performance.DataProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Threads</CounterName>
<ObjectName>System</ObjectName>
<InstanceName />
<AllInstances>false</AllInstances>
<Frequency>900</Frequency>
<Tolerance>0</Tolerance>
<ToleranceType>Absolute</ToleranceType>
<MaximumSampleSeparation>1</MaximumSampleSeparation>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData" />
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />
</WriteActions>
</Rule>
Information
Module Type |
|
InputType |
None |
Output Type |
|
Implementation |
Composite |
Library |
System.Performance.Library |