You can add tasks to your management pack that can be run to help diagnose issues and assist in recovery. In this topic, you will add a diagnostic task to your sample management pack and then test it.

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

Create the Diagnostic Task

  1. In the Health Model space of the main authoring console window, expand the Tasks node, and then clickt Diagnostics.

  2. Right-click in the Diagnostics list, then click New on the context menu, and then click Command Line Task.

  3. On the Command Line Task page, enter AuthoringConsole.MyFirstMP.DiagnosticTask in the ID field.

  4. Enter Diagnostic Task in the Display Name field.

  5. Select AvailabilityHealth from the Category drop-down list, and then click Next.

  6. On the Trigger Settings page, select AuthoringConsole.MyFirstMP.LOBApplication from the Target drop-down list.

  7. Select AuthoringConsole.MyFirstMP.MonitorConnectionState from the Monitor drop-down list.

  8. Select Warning from the Monitor Health State drop-down list, and then click Next to display the Configure Command Line Execution Settings page.

  9. On the Configure Command Line Execution Settings page:

    • Enter c:\windows\system32\ipconfig.exe in the Full path to file field.

      This path may be different on your system. You can also enter %Windir%\system32\ipconfig.exe in this step.
    • Enter /all in the Parameters field.

    • Click Finish to save the diagnostic and return to the Diagnostics list view.

  10. Save the management pack.

  11. Upload the management pack to the management group by clicking Tools, and then clicking Upload to management group from the authoring console menu.

  12. Select the appropriate management group from the Connect To Server dialog box, and then click Connect.

Test the Diagnostic

  1. In the Operations Console, click the Monitoring button.

  2. On the monitored server, run the following command from a command line:

    EventCreate /id 201 /t information /d Test

  3. Observe the state of the LOB Application instance as it becomes unhealthy.

  4. Right-click the LOB Application in the LOB Application State list view, click Open, and then click Health Explorer for AuthoringConsole.MyFirstApp.LOBApplication from the context menu.

  5. Expand the Entity Health and Availability nodes in the Health Monitors list on the left side of the authoring console window, and then click the LOB Application Connection State monitor.

  6. Click the State Change Events tab, and then select the warning event in the list view.

  7. In the Details area, locate the diagnostic task you just defined, click it, and then click Yes to confirm that you want to run the diagnostic task.

  8. The diagnostic output displays in the details view.

See Also