How to create an event monitor

Applies To: System Center Operations Manager 2007

Note

This exercise has been updated to include a procedure for Visual Studio Authoring Extensions in the latest version of the Management Pack Authoring Guide on the TechNet Wiki.

The following procedure shows how to create an event monitor 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.

  • Sets the monitor to a critical state when an event in the Application event log with an event source of MyApplication and an event number of 101 is detected.

  • Sets the monitor to a healthy state when an event in the Application event log with an event source of MyApplication and an event number of 102 is detected.

To create an event monitor

  1. In the Authoring Console, select Health Model, and then select Monitors.

  2. In the Monitors pane, expand Computer Role 1, and then expand System.Health.EntityState.

  3. Right-click System.Health.AvailabilityState, select New, select Windows Events, select Simple, and then select Event Reset.

  4. On the General page, do the following:

    1. In the ElementID box, type MyMP.Monitor.MyApplicationEventError.

    2. In the Display Name box, type MyApplication Event Error.

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

    4. In the Parent Monitor box, select System.Health.AvailabilityState.

    5. In the Category box, select AvailabilityHealth. Click Next.

  5. On the Event Log (Unhealthy Event) page, in the Log Name box, keep the default value of Application. Click Next.

  6. On the Event Expression (Unhealthy Event) page, do the following:

    1. For the Event ID value, type 101

    2. For the Event Source value, type MyApplication

    3. Click Next.

  7. On the Event Log (Healthy Event) page, in the Log Name box, keep the default value of Application. Click Next.

  8. On the Event Expression (Healthy Event) page, do the following:

    1. For the Event ID value, type 102

    2. For the Event Source value, type MyApplication

    3. Click Finish.

  9. Expand System.Health.AvailabilityState.

  10. Right-click MyMP.Monitor.MyApplicationEventError and select Properties.

  11. On the Health tab, for FirstEventRaised, change the Health State to Critical.

  12. On the Alerting tab, check Generate alerts for this monitor.

  13. Click OK.

See Also

Concepts

Events
Event Monitors