How to Test and Debug a Management Pack

適用於: Operations Manager 2007 R2, Operations Manager 2007 SP1

This topic discusses how to test the management pack that you created in the previous how-to topics, and then troubleshoot it. This will require access to a management group with at least one server to which you have administrative access.

Testing the management pack

  1. Load the management pack that you want to test. In this example, we will use the sample management pack we created in the How to Create a Management Pack With a Discovery Using the Windows Registry Template topic and subsequent topics.

  2. On the authoring console menu, click Tools, and then click Export to Management Group.

  3. Enter the name of your management server to connect to, and then click Connect to export the management pack to the management group.

  4. Open the Operations Console for the management group where you just uploaded the sample management pack.

  5. Go to the Management Packs view in the Administration area, and then verify the sample management pack is present.

  6. In the Operations Console, click Monitoring , and then open the LOB Application folder.

  7. Right-click the LOB application, and then click LOB Application State View.

  8. Refresh the view. The server should have an HKLM\Software\LOB registry entry which will cause the discovery in our management pack to run, at which point an instance of the LOB application class should be visible.

  9. Because you defined a monitor for this class, the instance will have some state associated with it. The instance may take a moment to appear as the monitor is initialized.

    be7daa08-caad-4916-ac7a-60cc90d44f3d

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

    EventCreate /id 201 /t information /d Test

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

    f3e79e40-c763-4c6e-967d-06a5cd603457

  12. Right-click the LOB application and look at the health explorer.

  13. View the knowledge associated with the monitor that is yellow.

    e48224a9-5b52-4620-9dd2-24c4879c7cb1

  14. Run the task you created to fix the application. This task runs the .cmd file that will log a successful event and reset the LOB application connection state.

    aec00207-d029-4cce-bc73-09f5a8f77aa2

    The state of the LOB Application instance should return to Healthy.

    deb2fd1a-8bc6-491e-b217-c9f488239a05

  15. Right-click the LOB Application instance, and then click Open and Event View.

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

    EventCreate /id 101 /t information /d Test

  17. In the same folder where the sample management pack was created, create a file called Newfile.log, and then add the following lines of text:

    • Param1, event1, column3

    • Time, event2, column3

    • Time, event3, column3

  18. Save the file. The text you added to the file shows up as events in the Event view.

Troubleshooting Your Management Pack

  1. Make sure the Operations Manager health service is running.

  2. Make sure our test management pack was imported by looking in the Management Packs view in the Operations Console.

  3. Check the Operations Manager event log in the event viewer for error or warning messages.

  4. Make sure the Operations Manager Audit Collection and Audit Forwarding Services are enabled and running.

另請參閱

工作

How to Create a Management Pack With a Discovery Using the Windows Registry Template

其他資源

Management Pack Authoring Console Scenarios