Export (0) Print
Expand All

How to Create a Rule

Updated: May 22, 2009

Applies To: Operations Manager 2007 R2, Operations Manager 2007 SP1

Management pack rules collect data from various sources, such as Perfmon, EventLog, SNMP, and log files. That data is then stored in the Operations Manager database or the data warehouse and can be used for reporting purposes. This topic shows how to create two rules: one that gathers information from Windows events, and the other that gathers information from a log file.

noteNote
This topic assumes that you are using the management pack created in the How to Create a Management Pack With a Discovery Using the Windows Registry Template topic.

Creating a Windows Event Rule

  1. Select the Health Model space in the authoring console, and then click the Rules view in the navigation tree.

  2. Right-click in the list view, and then click New, Collection, Event Based, and then Windows Event Collection from the context menu.

  3. Enter AuthoringConsole.MyFirstMP.LOBApplication.CollectEvent101 as the ID of the rule.

  4. Enter Collect event 101 as the display name.

  5. Select AuthoringConsole.MyFirstMP.LOBApplication from the drop-down menu for the target.

    9e074a0e-fd94-4d51-af5f-3060a36b6c0d
  6. Click Next.

  7. Leave Application as the name of the Windows Event Log, and then click Next.

    e9428c52-154e-4b13-9ac0-9fda38018998
  8. On the expression page, set the Event ID to equal 101 and the Event Source to EventCreate.

    c38d2369-4f8d-45d0-a733-b39152fad5c6
  9. Click Finish to create the rule and return to the Rules list. The new rule should appear in the list.

  10. Save the management pack by clicking File, and then clicking Save from the authoring console menu.

Creating a Windows Log File Rule

  1. Select the Health Model space in the authoring console, and then click the Rules view in the navigation tree.

  2. Right-click in the list view, and then click New, Collection, Event Based, Text Log (Delimited) from the context menu.

  3. Enter AuthoringConsole.MyFirstMP.LOBApplication.CollectLogFile as the Element ID of the rule.

  4. Enter Collect Log File as the Display Name.

  5. Select AuthoringConsole.MyFirstMP.LOBApplication from the drop-down for the target menu.

    042986cd-12f1-4fd4-b922-0c7daa1504e5
  6. Click Next.

  7. On the Application Log Data Source page, set the Directory to c:\SampleMP

  8. Set the Pattern to *.log

  9. Enter a comma in the Separator field.

    e1bd04d5-6c56-48aa-a8a8-aca928042d3e
  10. Click Next.

  11. On the Build Event Expression page, click Insert, and then specify the following values:

    • Set the Parameter Name to LogFileType

    • Set the Operator to Equals

    • Set the Value to Generic CSV Log File Format

      f63364e7-24d4-481b-8e67-5215d4224235
  12. Click Finish to create the rule.

  13. Save the management pack by clicking File, and then clicking Save from the authoring console menu.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft