本文件已封存並已停止維護。

How to create an event monitor targeted at class with multiple instances

更新日期: 2010年4月

適用於: System Center Operations Manager 2007

The following procedure shows how to create an event monitor in the Operations Manager 2007 Authoring console that is targeted at a class that has multiple instances on the agent. Because multiple instances are expected, additional criteria is required that includes a property of the target object. This ensures that each copy of the monitor applies to only a single instance of the target class. 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 one or more instances of MyApplicationComponent.

  • 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 201 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 202 is detected.

  • The name of the component is included in parameter 1 of the event.

To create an event monitor

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

  2. In the Monitors pane, expand My Application Component and then 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.MyApplicationComponentEventError.

    2. In the Display Name box, type My Application Component Event Error.

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

    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 201

    2. For the Event Source value, type MyApplication

    3. Click Insert.

    4. Click the button to the right side of the Parameter Name box on the new entry.

    5. Select Specify event specific parameter to use.

    6. Specify 1 for the event parameter.

    7. Click OK.

    8. In the Operator box, select equals.

    9. Click the button to the right side of the Value box and select ComponentName.

    10. 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 202

    2. For the Event Source value, type MyApplication

    3. Click Insert.

    4. Click the button to the right side of the Parameter Name box on the new entry.

    5. Select Specify event specific parameter to use.

    6. Specify 1 for the event parameter.

    7. Click OK.

    8. In the Operator box, select equals.

    9. Click the button to the right side of the Value box and select ComponentName.

    10. 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.

另請參閱

顯示: