Welcome this week’s edition of having fun with Operations Manager and Windows Media Center. In the first part of this series we discussed why it is beneficial to create your own class structure. In the second part of this series we discussed a wizard driven method to create your own class structure and discovery. In the third part of this series we showed how the health model works in Operations Manager and a processes to gather information which you will need to effectively monitor your application. In the fourth part of this series we discussed addition of rules and monitors to our custom management pack. In today’s blog post we will discuss the process to create views for our application and discuss how to customize your subscriptions to provide alerts which are easy to understand what information they are providing.

This blog post will specifically cover how to add monitoring which is relevant to the application including:

  • Creating views
  • Customizing subscriptions

 

Creating views:

There are three views which are included in this sample management pack. These show alerts, events and state for Windows Media Center. The Media Center Alerts view shows each of the alerts created by this management pack as shown below.

This view is created as an alert view with the following configurations (show all alerts related to our object which do not equal 255 (closed)).

The Media Center Events view shows all Media Center events which are collected as part of this management pack.

This view is created as an event view with the following configurations (show all events which were gathered for our object).

The Media Center State view shows all Media Center state based upon the health model that we defined in this blog series.

This view is created as a state view which is targeted to our object.

With these views we can easily identify the health of the Windows Media Center, identify any alerts from the Media Center and see the full set of events which are gathered from the Windows Media Center event logs.

 

Customizing subscriptions:

One of the biggest challenges with this management pack was to customize the subscriptions so that they are easy to read and did not require that each email was opened to understand what the notification was telling us. To make this work, we need to customize the channel and the alerts so that they give us what we need and only what we need in the subject of the email.

The alert needs to be customized so that the alert name is short and easy to identify (see the example below where the name has been shortened to “MC recorded”). The Alert Descriptions is set to the EventDescription.

$Data[Default=”]/EventDescription$

The one below shows the removal of a show from the Media Center.

Another example is shown below:

With the short alert name we can now use a custom channel to format the alert the way that we want to.

 

Customizing Channels and Subscriptions:

For this type of notification we want the subscription to only show the name of the alert and the alert description using syntax like what is shown below.

$Data[Default=’Not Present’]/Context/DataItem/AlertName$ $Data/Context/DataItem/AlertDescription$

This is a change from the default which is:

Alert: $Data[Default=’Not Present’]/Context/DataItem/AlertName$ Resolution state: $Data[Default=’Not Present’]/Context/DataItem/ResolutionStateName$

The screenshot below shows this functioning as designed where it is easy to see what has been recorded and removed without having to open the email messages.

 

Summary: Adding our views and creating our subscriptions finish out the steps which are required to make this into a functional management pack.

 

In the final part of this blog series we will provide links to all of the blog posts in this series, discuss next steps for the management pack and provide a download for the management pack sample which was built in this series.