Share via


Management Pack Health Model Exercise #7 - Creating a Dependency Monitor

This document is part of the Operations Manager Management Pack Authoring Guide



Overview

The following procedure shows how to create a dependency monitor  using  the Operations Manager 2007 Authoring console and Visual Studio Authoring Extensions.

Product Versions

This exercise applies to the following products:

  • System Center Operations Manager 2007 R2
  • System Center 2012 Operations Manager
  • System Center 2012 Operations Manager SP1

Prerequisites

Before you perform this procedure, you must first complete the following prerequisite procedures:

Revisions

The Microsoft System Center team has validated this procedure as of the original revision.  We will continue to review any changes and periodically provide validations on later revisions as they are made.  Please feel free to make any corrections or additions to this procedure that you think would assist other users

Sample Code

A sample of the completed code for each exercise is available in the TechNet Gallery.  There is a separate sample for each exercise that includes the management pack completed at the end of that exercise and each preceding exercise.  This strategy allows you to work through each exercise in order and then compare your results.  For VSAE, this also includes the Visual Studio solution. 

Details

The dependency monitors created in this procedure has the following characteristics:

  • Causes the health of instances of MyComputerRole1 to roll up to instances of MyComputerRole2 on the same agent.
  • One dependency monitor rolls up the health of the Availability aggregate monitor of MyComputerRole1 to the Availability aggregate monitor of MyComputerRole2.
  • One dependency monitor rolls up the health of the Performance aggregate monitor of MyComputerRole1 to the Performance aggregate monitor of MyComputerRole2.
  • Performs health rollup using worst state policy.

 

Authoring Console Procedure

Creating a dependency monitor on Availability aggregate monitor

  1. In the Authoring Console, select Health Model, and then select Monitors.
  2. In the Monitors pane, expand MyMP.MyComputerRole2 and then expand System.Health.EntityState.
  3. Right-click System.Health.AvailabilityState, select New, and then select Dependency Monitor.
  4. In the Choose a unique identifier box, type MyMP.MyComputerRole2DependsOnMyComputerRole1Availability. Click OK
  5. On the General page, do the following:
    1. In the Display Name box, type My ComputerRole 2 Depends On My Computer Role 1 Availability.
    2. In the Target box, select MyMP.MyComputerRole2.
    3. In the Parent Monitor box, select System.Health.AvailabilityState.  
  6. On the Monitor Dependency tab, do the following:
    1. Expand Entity Health for My Computer Role 1.
    2. Select Availability.  
  7. On the Health Rollup Policy tab, , select Worst state of any member.
  8. Click OK.

Creating a dependency monitor on Performance aggregate monitor

  1. In the Authoring Console, select Health Model, and then select Monitors.
  2. In the Monitors pane, expand MyMP.MyComputerRole2 and then expand System.Health.EntityState.
  3. Right-click System.Health.PerformanceState, select New, and then select Dependency Monitor.
  4. In the Choose a unique identifier box, type MyMP.MyComputerRole2DependsOnMyComputerRole1Performance. Click OK
  5. On the General page, do the following:
    1. In the Display Name box, type My ComputerRole 2 Depends On My Computer Role 1 Performance.
    2. In the Target box, select MyMP.MyComputerRole2.
    3. In the Parent Monitor box, select System.Health.PerformanceState.  
  6. On the Monitor Dependency tab, do the following:
    1. Expand Entity Health for My Computer Role 1.
    2. Select Availability.  
  7. On the Health Rollup Policy tab, , select Worst state of any member.
  8. Click OK.

Visual Studio Authoring Extensions Procedure

Creating a dependency monitor on Availability aggregate monitor

  1. Create the Monitor:
    1. In Solution Explorer, right click Monitors.mptg and then select Open.
    2. Right click in the  template window and select Add Template.
    3. Select Monitor (Dependency) and click OK.
  2. Configure the Monitor Properties:
    1. Right click the entry for NewDependencyMonitor and select Properties Window.
    2. Change the ID to MyComputerRole2DependsOnMyComputerRole1Availability.
    3. Change the Display Name to My ComputerRole 2 Depends On My Computer Role 1 Availability.
  3. Select the Monitor Target:
    1. Select Target and click the ellipse (...) button on the right of the field. 
    2. Select ****MyMP.MyComputerRole2 and click OK..
  4. Configure the Monitor:
    1. Select Parent Monitor ID and click the ellipse (...) button on the right of the field. 
    2. Select System.Health.AvailabilityState and then click OK.
    3. Select Relationship Type and click the ellipse (...) button on the right of the field.
    4. Select MyMP.MyComputerRole2ContainsMyComputerRole1 and then click OK.
    5. Select Member Monitor and click the ellipse (...) button on the right of the field.
    6. Select System.Health.AvailabilityState and then click OK.
  5. Save and Compile the Project:
    1. Select File, and then click Save Monitors.mptg.
    2. Select Build and then Build Solution.
    3. Ensure that you don't receive any errors. 

Creating a dependency monitor on Performance aggregate monitor

  1. Create the Monitor:
    1. In Solution Explorer, right click Monitors.mptg and then select Open.
    2. Right click in the  template window and select Add Template.
    3. Select Monitor (Dependency) and click OK.
  2. Configure the Monitor Properties:
    1. Right click the entry for NewDependencyMonitor and select Properties Window.
    2. Change the ID to MyComputerRole2DependsOnMyComputerRole1Performance.
    3. Change the Display Name to My ComputerRole 2 Depends On My Computer Role 1 Performance.
  3. Select the Monitor Target:
    1. Select Target and click the ellipse (...) button on the right of the field. 
    2. Select ****MyMP.MyComputerRole2 and click OK..
  4. Configure the Monitor:
    1. Select Parent Monitor ID and click the ellipse (...) button on the right of the field. 
    2. Select System.Health.PerformanceState and then click OK.
    3. Select Relationship Type and click the ellipse (...) button on the right of the field.
    4. Select MyMP.MyComputerRole2ContainsMyComputerRole1 and then click OK.
    5. Select Member Monitor and click the ellipse (...) button on the right of the field.
    6. Select System.Health.PerformanceState and then click OK.
  5. Save and Compile the Project:
    1. Select File, and then click Save Monitors.mptg.
    2. Select Build and then Build Solution.
    3. Ensure that you don't receive any errors.

See Also