How to create a WMI performance collection rule

適用於: System Center Operations Manager 2007

The following procedure shows how to create a WMI performance collection rule in the Operations Manager 2007 Authoring console. Before you perform this procedure, you must first complete the prerequisite procedure How to Create a Class in which you create the target class.

The monitor created in this procedure has the following characteristics:

  • Runs on any computer that has an instance of MyComputerRole1.

  • Collects the size for a file that is named C:\Logs\MyAppFile.txt.

To create a WMI performance collection rule

  1. In the Authoring console, select Health Model, and then select Rules.

  2. Right-click in the Rules pane, select New, select Collection, select Performance Based, and then select WMI Performance Collection.

  3. On the General page, do the following:

    1. In the ElementID box, type MyMP.Rule.CollectWMIPerformance.

    2. In the Display Name box, type My Application Collect WMI Performance.

    3. In the Target box, select MyMP.MyComputerRole1.

    4. In the Category box, select PerformanceCollection. Click Next.

  4. On the WMI Configuration page, do the following:

    1. In the WMI Namespace box, type root\cimv2.

    2. In the Query box, paste the following WMI query.

      Select Name,FileSize From CIM_DataFile Where Name = 'C:\\Logs\\MyAppFile.txt'
      
    3. In the Query Interval box, type 900.

    4. Click Next.

  5. On the Performance Mapper page, do the following:

    1. In the Object box, type MyApp.

    2. In the Counter box, type FileSize.

    3. In the Instance box, type $Data/Property[@Name=’Name’]$.

    4. In the Value box, type $Data/Property[@Name=’FileSize’]$.

    5. Click Finish.

另請參閱

概念

Performance Data
Performance Collection Rules