How to create a diagnostic

適用於: System Center Operations Manager 2007

The following procedure shows how to create a diagnostic that runs a command in the Operations Manager 2007 Authoring console. Before you perform these procedures, you must complete the following prerequisite procedures:

The diagnostic created in this procedure has the following characteristics:

  • Automatically runs when the MyMP.Monitor.MyApplicationEventError monitor goes to a critical state.

  • Runs tasklist.exe to return a list of running processes on the agent computer.

To create a diagnostic that runs a command

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

  2. In the Monitors pane, expand MyMP.MyComputerRole1, and then expand System.Health.EntityState, and then expand System.Health.AvailabilityState.

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

  4. Select the Diagnostic and Recovery tab.

  5. Click Add and then Diagnostic for a critical health state

  6. In the Choose a unique identifier box, type MyMP.MyApplicationEventError.CommandDiagnostic and then click OK.

  7. On the General tab, do the following:

    1. In the Name box, type Check Running Processes.

    2. In the Target box, make sure that MyMP.MyComputerRole1 is selected.

  8. On the Configuration tab, do the following:

    1. In the Execute on monitor box, make sure that MyMP.Monitor.MyApplicationEventError is selected.

    2. In the Execute when monitor’s health is box, make sure that Error is selected.

  9. On the Modules tab, do the following:

    1. Under Actions, click Create.

    2. In the Choose Module Type box, select System.CommandExecutorProbe.

    3. In the Module ID box, type Command. Click OK.

    4. Click Edit.

    5. Click Configure.

    6. In the Full path to file box, type %windir%\system32\tasklist.exe.

    7. Click OK.

    8. Click OK.

    9. Click OK.

    10. Click OK.

另請參閱

概念

Diagnostics and Recoveries