Updated: May 13, 2016
Applies To: System Center 2012 R2 Operations Manager, System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager
WMI performance refers to numeric data that is retrieved from a WMI query. This lets performance data be retrieved that is not available from a performance counter and without using the complexity and overhead of a script. The monitor or rule runs the query on a specified schedule and maps the value of the specified numeric field into the value property of the performance data.
For example, a monitor might have to track the size of a particular file. This might be a log file that indicates a particular problem when it exceeds a particular size. The name and size of the file could be retrieved from a query similar to the following:
The monitor could run this query regularly by using the FileSize property for the value of the performance data and the Name property for the Instance property.
The WMI query returns a property bag with each property returned from the query. This set of properties will vary, depending on the class returned and the properties specified in the query. For more information about property bags, see Property Bags.
When you run the Windows performance collection wizard, you will need to provide values for options in the following tables. Each table represents a single page in the wizard.
The General page includes general settings for the rule including its name, category, target, and the management pack file to store it in.
The name used for the rule. This appears in the Rules view in the Authoring pane. When you create a view or report, you can select this name to use the data collected by it.
Optional description of the rule.
Management pack to store the rule.
For more information on management packs, see Selecting a Management Pack File.
The category for the rule. For a performance collection rule, this should be Performance Collection.
The class to use for the target of the rule. The rule will be run on any agent that has at least one instance of this class. For more information on targets, see Understanding Classes and Objects.
The Performance Counter page includes the definition of the performance counter to collect and the frequency it should be collected.
The namespace containing the class used by the query.
Name of the performance counter.
The frequency in seconds to run the query and collect the
The Performance Mapper page is used to define values for the properties of the performance data being collected.
Text for the Object name. This is required. You can type in the name of the object or select a property from the target or from the property bag.
Text for the Counter name. This is required. You can type in the name of the object or select a property from the target or from the property bag.
Text for the Instance name. This only required if the target of the rule has multiple instances. You can type in the name of the object or select a property from the target or from the property bag.
Numeric for the value for the performance. This will usually be a $Data variable to use a value from the property bag.
Use the following procedure to create a WMI performance collection rule in Operations Manager with the following details:
Runs on all agents with a particular service installed.
Collects the size of a file called C:\MyApp\MyAppLog.txt.
To create a WMI performance collection rule
If you don’t have a management pack for the application that you are monitoring, create one using the process in Selecting a Management Pack File.
Create a new target using the process in To create a Windows Service template. You can use any service installed on a test agent for this template.
In the Operations console, select the Authoring workspace, and then select Rules.
Right-click Rules and select Create a new rule.
On the Rule Type page, do the following:
Expand Collection Rules, expand Performance Based, and then click WMI Performance.
Select the management pack from step 1.
On the General page, do the following:
In the Rule name box, type Collect File Size with WMI.
In the Rule Category box, select Performance Collection.
Next to Rule Target click Select and then select the name of the target that you created in step 2.
Leave Rule is enabled selected.
On the Performance Mapper page, do the following:
In the Object box, type MyApplication.
In the Counter box, type File Size.
In the Instance box, type $Data/Property[@Name=’Name’]$.
In the Value box, type $Data/Property[@Name=’FileSize’]$.