Export (0) Print
Expand All

How to Create Tasks

Updated: May 22, 2009

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

Tasks are an effective way to provide actions to users that they can launch to help solve an issue with a monitored application. The following procedure shows you how to create a task that will launch a corrective batch file when the monitor you created enters a warning state.

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 and subsequent topics.

Create the batch file

  • Create a batch file called fixLOBApplication.cmd. This batch file should contain a single line:

    eventcreate /t error /id 202 /l application /d "description"

    Save this batch file in the C:\SampleMP directory.

Create the task

  1. In the Health Model window, click Tasks in the navigation tree, and then click Agent Tasks.

  2. Right-click the Agent Tasks view, click New, and then click Command Line Task (Probe Action). The Command Line Task (Probe Action) Wizard will start.

  3. In the Element ID text box, enter AuthoringConsole.MyFirstMP.Task

  4. In the Display Name text box, enter Fix LOB Application

  5. In the Target drop-down list, click AuthoringConsole.MyFirstMP.LOBApplication

  6. In the Category drop-down list, click Operations

    a8614530-c167-43da-be2b-449b9808918a
  7. Click Next to go to the Command Line page of the wizard.

  8. In the Full path to file text box, enter c:\windows\system32\cmd.exe

    noteNote
    This path may be different on your system. You can also enter %Windir%\system32\cmd.exe in this step.

  9. In the Parameters text box, enter /c c:\SampleMP\FixLOBApplication.cmd

    48be6e07-b206-46fe-b1a5-764fdce67833
  10. Leave the Additional settings as it is, and then click Finish to create the task and return to the Agent Tasks view.

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

You have now created a task that can be used to launch a corrective batch file when the monitor we created enters a warning state.

See Also

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

Community Additions

ADD
Show:
© 2014 Microsoft