In this post, I’ll be using the Visio Management Pack Designer (VMPD) to quickly create a Management Pack (MP) to monitor how long servers have been running and generate an alert if they’ve been running longer than a specified period of time.
I’ll also be making a quick modification to the MP using the Operations Manager Authoring Console to demonstrate how the MP Authoring lifecycle works out when using multiple authoring tools.
Note: For more details on using VMPD including an excellent example, I highly recommend this TechNet Wiki.
The overall steps for monitoring system uptime with VMPD and OpsMgr Authoring Console are…
- Create the base MP using VMPD
- Modify the MP using the OpsMgr Authoring Console
- Deploy the MP
Let’s get going!
Step 1 – Create the Base MP Using VMPD
Note: If you’re not familiar with how to setup the VMPD tool and the required prerequisites, first refer to this TechNet Wiki.
Fill in the Management Pack information using the screen shot below as a guide. Change the value of “Connector Mode” to “FALSE”.
Next, drag over a Server Component shape and fill in your discovery using the information below as a guide.
I want to point out here that the Registry Key used is Software\Microsoft\Windows – meaning all Windows installations. I did this mainly for the purpose of this blog posting; however, in an enterprise setting, you want to make sure that you target your discovery as specific to your needs as possible. If you don’t need to implement this monitoring scenario on every single Windows agent deployed, pick something more specific. Many customers will add registry keys to their server installations for this purpose (e.g., Software\Contoso\LOB1, Software\Contoso\infrastructure, etc.)
Next, drag over the Windows Performance Counter Monitor shape and fill it in using the information below as a guide.
The hard part here is to make sure that you have the right performance counter Object and Counter.
Note that this simple screen provides you with…
A monitor with thresholds set and alert configured
A performance collection rule
Long time Authors will surely realize how much effort has been saved in a few clicks. Also note that behind the scene, the VMPD will create monitoring views for you as well.
Lastly, generate the MP. For more information on this step, see this TechNet Wiki article.
You now have a fully functional MP that will work in either an OpsMgr 2007R2 or OpsMgr 2012 environment.
However, some configurations should be modified, but just can’t be done in the VMPD. For example, you were unable to specify how often your discovery is running. You may wish to check that out and perhaps modify the value.
Step 2 – Modify the MP Using the OpsMgr Authoring Console
Next, open up the MP in the Authoring Console. Feel free to poke around to see what’s been created for you already. Veteran MP Authors should be impressed .
Since you are monitoring against all Windows Servers, you probably want to change the discovery schedule. Find the SEED discovery; right click; click on Property and modify it (see below). The default value is 14400 (4 hrs).
If you are new to MP Authoring, I may have lost you at “SEED discovery”. No sweat; here’s a good explanation and how/when to use it.
Now here’s the key. When you generated the MP using the VMPD, you began a one-way trip with your MP. Since Visio cannot read the MP format (sealed or not), you cannot open a generated MP using Visio.
What does this means? Well, for one thing, once you make changes to the MP (which you did using the Authoring Console), if you want to change your base MP (for example, you also want to add Windows Event Monitors/Rules), you have two choices:
Add the extra components (e.g., Windows Event Monitor/Rules) to the MP using the Authoring Console, OR
Add the extra components to the original Visio drawing, re-generate the MP, and remake the modifications to the new MP using the Authoring Console.
Depending on the extra modifications to make, you’ll need to judge where effort is best spent. If all you did was change the discovery schedule or change whether a discovery/monitor/rule is disabled by default, it may be ok to make those changes again.
In order to avoid confusion and mix up (you thought you added this monitor ages ago), be very diligent in your versioning and documenting of your custom MPs. For example, once you modify your MP in the Authoring Console, increment the MP version number and add a comment to the description field. See below.
Step 3 – Deploy the MP
Once imported, you now have custom classes, a monitor, a performance collection rule, some views, and a report, and it took you minutes to get it done using the VMPD as a base.
I’m hoping that this exercise has driven home the point on how powerful the VMPD tool is. Sure you could have created a monitor and a performance rule based on this single performance counter (system uptime) easily through the administrator console, but the addition of views and a report is where the extra work and multiple components become more tedious.
More importantly, you now have a good base MP on which to extend your monitoring. And you’ve also done all that work offline, while the administrator console is working against the live environment.