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 this blog post we will review methods available to create your own management packs and we’ll go through a step-by-step to create the management pack, discovery and class structure used in the Media Center monitoring management pack.

Options available to create your own management packs:

There are a variety of methods available to create your own management packs which perform a discovery and create the appropriate class structure.

  • Visual Studio Authoring Extensions (VSAE): Available for download at: http://www.microsoft.com/en-us/download/details.aspx?id=30169. However, if you are an efficient user of VSAE and Visual Studio you probably can create your own management packs and class structures so you probably don’t need to continue with my blog post J
  • Operations Manager 2007 R2 authoring console in stealth mode: The original Operations Manager 2007 Authoring Console is available for download at http://www.microsoft.com/en-us/download/details.aspx?id=18222 and it does work for Operations Manager 2012 as long as you aren’t trying to use it for SNMP functionality or designing dashboards. This is how I used to create my own management packs if it was beyond what could be effectively created in the Operations Manager console.
  • XML: Heck, you could write your own management packs in notepad++ or just plain old notepad but again I doubt if you are still reading this if you write your own management packs in notepad. I however stand by my original statement on this "XML isn’t a user interface" J
  • MP Author by Silect: Silect provides a free tool available for download at: http://www.silect.com/mp-author. In my opinion this is the most efficient and user friendly method available to develop management packs if you aren’t already a developer by nature. To paraphrase a well-known OpsMgr colleague of mine (we’ll call him "Kevin"), this approach is extremely valid when you "need the simple ability to create application classes for granular targeting.  Start with MP author, then move to the SCOM UI for creating your groups, overrides, custom workflows, views, etc."

 

Creating your own management pack with MP Author:

So, how do you build your own management pack with MP Author? Start by downloading and installing it. Next you go through the Management Pack Creation Wizard which makes this straightforward and intuitive.

MPWizard01.png

To create the management pack you need a unique name, version number, friendly name (and MP Author auto-adds the description as shown below). For this example we are creating a management pack to monitor Media Center so my creative juices really flowed and I called it "Monitor Media Center".

Next we specify a working folder (default shown below for my user).

Choose the appropriate management pack references (the defaults are shown below).

There are three management pack templates to work from as shown below. For my use case (Windows Media Center) a single server application works like a champ.

Next we need to define the target that the management pack will monitor. Options include registry settings, scripts, and WMI. For my example I am looking for a registry key (the fully populated screen is shown below after completing the Management Pack Target Wizard).

For the registry you can browse to the computer and find the registry data or you can manually enter it. In my example, I did a registry check for the "BITS" service which I later changed to match the service name that I really wanted the discovery to use to identify a Windows Media Center system.

The registry key below shows the BITS service information in the registry.

Next we can define the target. I took the defaults as shown below for the Media Center application.

Next we identify the discovery for this specific target (again I took the defaults).

For my example I changed the DisplayName field from BITS to "Mcx2vc" which is the service name I was looking for as part of my discovery.\

Discovery should not be run extremely frequently unless you are testing the management pack. Once a day for this management pack should be more than sufficient as I don’t expect to be adding other Media Center servers frequently.

Finally we create the target and discovery.

The wizard does require the creation of a monitor but I started by creating a blank one for now which I could remove later since this step was just to create the management pack, class and discovery. Since the monitor is temporary the rollup taken was the default shown below.

Now we create the management pack!

To finish out the wizard process I had to go back and change the registry setting discovery to point to the correct location (not BITS as I used in this example). I also deleted the monitor that I created during the wizard. The next step was just to import my new management pack and see if it worked!

 

So what do we get in the Operations Manager console?

Once the management pack is imported we can see it in the Administration pane under management packs.

On the Monitoring pane we can change the discovered inventory view to point to our new object as shown below:

And on the Authoring pane we can see the discovery which was created for this new class of objects.

NOTE: It was pointed out to me that it would make more sense to change the object discovery target from Windows Computer to Windows Client so that this management pack does not attempt to discover Windows Media Center systems on Server Operating Systems.

Summary: Using the wizard in the Silect MP Author tool greatly simplifies the process to create your own management pack, discovery and class structure. Once this is done we can either continue development with MP Author or we can revert to familiar methods within the Operations Manager console to create management pack rules, monitors, and views.

In the next part of this blog series we will look at methods to effectively gather and filter events to use in Operations Manager for the application that you want to monitor.