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

How to create a repeating event monitor

更新日期: 2010年4月

適用於: System Center Operations Manager 2007

The following procedure shows how to create a repeating 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 201 is detected 3 times within 5 minutes.

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

To create a repeating 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 System.Health.EntityState.

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

  4. On the General page, do the following:

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

    2. In the Display Name box, type My Application Repeating 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 Repeated Event Log page, in the Log Name box, keep the default value of Application. Click Next.

  6. On the Repeated Event Log Expression page, do the following:

    1. For the Event ID value, type 201

    2. For the Event Source value, type MyApplication

    3. Click Next.

  7. On the Repeated Event Detection page, do the following:

    1. For the Counting Mode, select Trigger on count, sliding.

    2. For the Compare Count, type 3.

    3. Select Based on items occurrence within a time interval.

    4. For the Interval, type 5 and select Minutes.

  8. On the Repeated Event Log page, in the Log Name box, keep the default value of Application. Click Next.

  9. On the Simple Event Log page, do the following:

    1. For the Event ID value, type 202

    2. For the Event Source value, type MyApplication

    3. Click Finish.

  10. Expand System.Health.AvailabilityState.

  11. Right-click MyMP.Monitor.MyApplicationRepeatingEventError and select Properties.

  12. On the Health tab, for RepeatedEventRaised, change the Health State to Critical.

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

  14. In the Alert description box, type Event 201 was detected $Data/Context/Count$ times between $Data/Context/TimeWindowStart$ and $Data/Context/TimeWindowEnd$. The first event was at $Data/Context/TimeWindowStart$. The last event was at $Data/Context/TimeWindowEnd$.

  15. Click OK.

另請參閱

顯示: