Xplat Xperts

  • Home
  • Archives
  • Subscribe

Writing Management Packs for SCOM: Adding Dashboards

The next step in extending our custom MP is taking it beyond the monitors and performance views and cleaning it up so we can look at different metrics in logical groups.  For an mP like Hyper-V you'll want to look at both the % Hypervisor Run Time and the % Guest Run Time in the same view so you can see how well they are comparing to one another.

To build out a dashboard is pretty straight forward, you simply need to decide how you want to view the data.  It's no different from building an HTML table, you specify the number of columns and rows then assign a performance view to each cell.

For the example, I'm going to create a Dashboard that combines 4 performance views into a 2 x 2 grid.

Blog-CreateDashboard

Using the Authoring Console:

  1. Go to Presentation->Views
  2. Right Click the Views pane and select New->Custom View
  3. Give the dashboard an ID such as BridgeWays.Windows.HyperV.LogicalProcessor.Dashboard
  4. Give it a friendly name such as Logical Processors
  5. Set the Target to System.Entity
  6. Click on the Configuration tab and click Browse for a type
  7. Select Microsoft.SystemCenter.DashboardViewType from the list and click OK
  8. Click Edit... on the Configuration page to launch our XML editor
  9. The XML is pretty straight forward, set the <PanelConfiguration> XML to be:
    <PanelConfiguration Column="2" Row="2">
      ViewID="BridgeWays.Windows.HyperV.LP.TotalRunTime.Perf">
      ViewID="BridgeWays.Windows.HyperV.LP.HypervisorRunTime.Perf">
      ViewID="BridgeWays.Windows.HyperV.LP.IdleRunTime.Perf">
      ViewID="BridgeWays.Windows.HyperV.LP.GuestRunTime.Perf">
    PanelConfiguration>
  10. Close the editor
  11. Select the Folder tab and click the folder you want the performance view to be in.
  12. Click OK

Let's deconstruct the XML a little, all I've done is defined a 2x2 grid with the <PanelConfiguration> element attributes.  Then I specified which performance view to put in each cell.  That's it, pretty straight forward and once we saved it we're done... almost.

Since we've build a dashboard showing 4 performance views there isn't much point in having both the dashboard and the performance views in the same folder.  So the last thing I would do is open the properties dialog for each contained performance view, go to the Options tab and toggle Visible to "false".  Now we'll only see the Dashboard that was created.

So how does our dashboard look when we add it to the MP?

Blog-Dashboard 

At this point, you should have a pretty good handle on building monitors, performance views and dashboards.  These are the basic building blocks of MPs and the key here is to remember you can build these to extend existing MPs as well as for making your own MPs from scratch.

Part 1: Getting Started with writing a more robust Hyper-V MP
Part 2: Adding your own Monitors
Part 3: Adding Rules and Performance Views
Part 4: Adding Dashboards

Posted on March 06, 2010 at 02:59 PM | Permalink | Comments (0) | TrackBack (0)

Reblog (0) | Digg This | Save to del.icio.us | Tweet This!

New BridgeWays Betas: WebSphere, WebLogic and Generic JVM monitoring with SCOM

Some great news from the BridgeWays side of things, we just released 3 new Beta management packs:

  • BridgeWays Management Pack for WebSphere Application Servers
  • BridgeWays Management Pack for WebLogic Servers
  • BridgeWays Template for Java Attributes

These 3 MPs all use our JMX collector technology that allows us to connect to and consume data from JEE servers that is exposed via JMX.  The template is very exciting because it allows you not only to monitor generic JVMs, but it also allows you to consume any MBean no matter what the JVM and that means you can start to monitor the JMX instrumented application running on top of the common JEE servers like JBoss, WebSphere, WebLogic and even Tomcat.

WebSphere

The WebSphere and WebLogic MPs provide you with preconfigured monitoring on the application servers, pulling in the server load, JDBC connections, thread pools and other metrics required to ensure the JEE servers are healthy.

JavaAttributes 

The Java Template MP can be used along side the JEE Application server MP or to discover and configure monitoring of any generic JVM.  The MP includes a standard SCOM template that you can use to specify mbean attributes to monitor and build performance views for.
 
If you are interested in more information on these new MPs, please contact sales@bridgeways.ca

Posted on March 02, 2010 at 09:25 PM in BridgeWays, Management Packs, SCOM | Permalink | Comments (0) | TrackBack (0)

Reblog (0) | Digg This | Save to del.icio.us | Tweet This!

Writing Management Packs for SCOM: Adding Rules and Performance Views

So where are we... we've built out our MP, added a state view and added monitors to the objects discovered. Now we want to collect information that we can build some performance views and store it in the datawarehouse so we can report on it.

Once again, open up the Authoring Console (I'm trying to do as much as I can through the console), goto the Health Model tab and select the Rules object. 

Hyper-V Rules Frame 

Let's add a new Rule:

  1. Right click and select New->Collection->Performance Based->Windows Performance Collection
  2. Give our rule a name, I'm going to gather Logical Process Hypervisor Run Time so I'll name my rule BridgeWays.Windows.HyperV.LP.HypervisorRunTime
  3. Give it a friendly display name, Logical Processor Hypervisor Run Time
  4. Set the target, for me it's Microsoft.Windows.HyperV.ServerRole
  5. Click next
  6. Now we specify the perfmon counter we want to gather, Object = Hyper-V Hypervisor Logical Processor, Counter = % Hypervisor Run Time, Instance is empty and check the "Include all instances..." check box.
  7. Set the time interval, 15 minutes is the minimum you should start with
  8. Click Next
  9. Optimized vs. Non-Optimized... it really comes down to your tolerance for 'real time' data.  If you hate seeing missed polls (ie no data returned for 30 minutes because the data hasn't changed), don't use Optimized collection.  If you'd like to reduce the amount of data flowing over the network, use optimized.
  10. Click Finished

That's it, we've created a rule. 

Rules are used to collect data and store it out so that other things, like Performance Views, can consume the data and present it to the user.

So while we've created a rule, now we need to create a performance view that uses that rule.

To build the performance view we need to switch to the Presentation tab and click on the Views object.

Hyper-V Perf View 

First thing is to create a nice folder hierarchy to put our views into.  I created two folders, Performance and Processor so that my folder hierarchy in SCOM looks like:

Hyper-V Processor Folder
Now to create out Performance View:

  1. Right Click, New->Performance View
  2. Give it a name, I use BridgeWays.Windows.HyperV.LP.HypervisorRunTime.Perf (I simply mimic the rule name and add .Perf)
  3. Give it a friendly display name, Logical Processor Hypervisor Run Time
  4. Select the target, Microsoft.Windows.HyperV.ServerRole
  5.  Click finish

So, are you done?  nope, that little wizard didn't really do all that much. Now we have to actually create the tie from the View to the Rule. 

  1. Right click the view, select Properties, goto the Configuration tab
  2. You'll see an interesting dialog showing Criteria... click Edit
  3. Specify the editor you want to use (you can make this permanent using the Tools->Options dialog), I use Visual Studio whose default install path is C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
  4. Time for the voodoo, you can find most of the Schema items in the authoring guide, in this case we're going to tie our view to the perfmon counter we collect in our rule so we need to specify that in the XML using:
    <Criteria>
      <Object>Hyper-V Hypervisor Logical Processor
      <Instance />
      <Counter>% Hypervisor Run Time</Counter>
    </Criteria>
  5. Close the editor
  6. Click the folder tab and ensure that the right folder is selected, I select the BridgeWays.Windows.HyperV.Processor only
  7. Click Options and make the view public
  8. Click OK

Ok, now we're done.  It would actually be pretty easy if the console would simply allow you to select the rule and it auto-magically generated the XML... but we're not that lucky yet.

In the end we have a performance view, showing up in the tree.

Hyper-V Processor Perf

You can repeat this process to build additional Rules and Performance views on those rules.  Once that is done it's time to combine those views into Dashboards... we'll go over that another time.

Part 1: Getting Started with writing a more robust Hyper-V MP
Part 2: Adding your own Monitors
Part 3: Adding Rules and Performance Views
Part 4: Adding Dashboards

Posted on February 15, 2010 at 07:19 PM in Hyper-V, SCOM | Permalink | Comments (0) | TrackBack (0)

Reblog (0) | Digg This | Save to del.icio.us | Tweet This!

Writing Management Packs for SCOM: Adding your own Monitors

In the first part of this series we got our toolset setup so that we can write our own MP, created a root folder and added a state view to duplicate the Hyper-V Server Role state view. 

Now it's time to start adding our own extensions to the base Hyper-V MP, keep in mind that what I'm doing here will work with any management pack, including the BridgeWays MPs where we may be exposing data but only consuming it through rules and you want to add a monitor.

So open up the Authoring Console and goto the Health Model frame.  You'll see that we have the option to add Discoveries (we don't need these right now because the base Hyper-V MP is doing this for us), Monitors, Rules, Service Levels, etc.

Hyper-V Monitors Frame

Let's create a new monitor:

  1. Right-Click the view frame and select New->Windows Performance->Static Threshold->Average Threshold to create a new monitor that will take the average of a series of polls and determine Health/Error state from that average value
  2. Provide a new name, I'm going to build an alert for the number of Virtual Machines being reported as in a critical state, so my name is VMsCritical
  3. Give the monitor a display name "Virtual Machines are Critical"
  4. Specify the target by clicking the ellipses, selecting list and finding hyper.  I set the target to Microsoft.Windows.HyperV.ServerRole so that the monitor will run against any Hyper-V Server
  5. Set the Parent Monitor to be System.Health.PerformanceState.  This is because I feel VMs in a critical state is a resource issue causing bad performance, it's not necessarily an Availability issue because the VMs are running.
  6. Click Next
  7. Now, we set the object we're going to monitor.  You can either hit the Select button and search for the appropriate perfmon counter through the dialog that pops up or enter the data directly.  For this counter it is:  Object = Hyper-V Virtual Machine Health Summary, Counter = Health Critical, Instance is blank.
  8. Set an appropriate interval for the monitor, 5 minutes is the lowest you should go.
  9. Click Next
  10. Set our threshold, I use 1 because I want to know if even a single VM is critical
  11. Set our number of samples, I use 2 if a VM goes critical and then clears the next poll... I'm fine with that, the problem was a blip.
  12. Click finish and we're almost done.

We've created the base monitor, now we just need to do a little tweaking to make it be everything we want it to be.  To finish things off, select the monitor and click properties.

Hyper-V VMs Critical 

  1. Goto to the Health Tab and change the Over Threshold Health state to be Critical, I do this because I view VMS being critical as a Critical alarm.
  2. Click on the Alerting tab and select Generate alerts for this monitor, you can also tweak the priority and severity which helps you sort alerts in custom alert views where you may only want to see Critical alerts shown.
  3. Click on the Options tab and change Accessibility to "Public" so that you can make future MPs that extend this MP and people can add Diagnostic and Recovery tasks to the monitor without having to be part of this MP directly.
  4. Click on Product Knowledge, Edit and this will launch Word, if you have it and visual studio installed, so you can create a KB article. 
  5. Goto the word document that launched and add some knowledge base information about the monitor, why it would fire, and how to fix it.

Now that we've done that, save your MP.  Import the new version into SCOM and see how the monitor shows up under the Performance

Hyper-V Health Model

Repeat this process to add any additional monitors you may wish to have.

Part 1: Getting Started with writing a more robust Hyper-V MP
Part 2: Adding your own Monitors
Part 3: Adding Rules and Performance Views
Part 4: Adding Dashboards

Posted on February 12, 2010 at 04:02 PM in Operations Manager, Technology | Permalink | Comments (0) | TrackBack (0)

Reblog (0) | Digg This | Save to del.icio.us | Tweet This!

Writing Management Packs for SCOM: A more robust Hyper-V MP

Have you ever been looking at a management pack and wishing it was collecting just a little more information for you?  You're not the only one, there are quite a few people who write MPs from scratch to support applications they are running, but there are more who are still a little leery of going down the path of MP Authoring.  In the next series of posts I'm going to walk through extending the base Hyper-V management pack so that it provides more information around how healthy the servers really are. 

Tools of the trade:

  1. System Center Operations Manager 2007 R2 Authoring Console: I'm going to focus on writing the MP using the Authroing console as opposed ot raw XML, it's a good tool to use when you want to build out quick Windows based monitors, validate the XML schema, and see all the views you have created. http://www.microsoft.com/downloads/details.aspx?FamilyID=9104af8b-ff87-45a1-81cd-b73e6f6b51f0&displaylang=en
  2. XML editor: trying to make things like Dashboards. Performance views and a few other components still require that you write raw XML, so you'll need an editor which can be nothing more than notepad if you wish, I use Visual Studio
  3. Authoring Guide: keep it handy so you can make reference to it when some of the XML layout makes you want to scream. http://technet.microsoft.com/en-us/opsmgr/bb498235.aspx
  4. Install the SCOM console on the system you will be doing the authoring on
  5. To make writting KB articles a bit easier, install Visual Studio and Word on the system you will be using to author the MPs.

Now let's run through the steps to get things setup:

  1. Get a copy of the MP you want to extend, you do this by downloading the manual install package as opposed to installing the MP via the SCOM catalog.  For Hyper-V you can get the installer at: http://www.microsoft.com/DownLoads/details.aspx?familyid=502E7A26-2FEA-4052-89FD-8F75142DE4F2&displaylang=en
  2. Run the installer and extract the sealed MPs to a local path like c:\authoring\dependencies
  3. Launch the Authoring Console
  4. Select File->New.. Empty Management Pack
  5. Give your MP a name, I used BridgeWays.Windows.HyperV
  6. Give your new MP a Display Name, such as "BridgeWays Windows Hyper-V"
  7. Create

You now have an unsaved shell Management Pack that does nothing.  So let's set it up to extend the core Hyper-V MP:

  1. Click Tools->Options...
  2. Go to the references tab and add in the System Center directory and the directory where you put the Hyper-V MP.

    References
  3. Next, go File->Management Pack Properties and go to the References tab
  4. Click Add Reference
  5. Select the MPs that you want to extend and use, I selected the Hyper-V MPs
    MPs

Now we're ready to start adding our rules and monitors.

Let's start by checking to see if we can extend the MP directly, ie add our own folders and views to the Hyper-V folder in the SCOM Monitoring hierarchy.  This is determined by whether or not the root folder is flagged as 'internal' or 'public'.

  1. In the Authoring Console, click the Presentation tab.
  2. Right-Click the Microsoft.Windows.HyperV.RootFolder and select New->Folder
  3. Give your new folder an object name such as BridgeWays.Windows.HyperV.Performance and a display name like Performance
  4. Click the Folder tab and make sure the selected folder is Microsoft.Windows.HyperV.RootFolder
  5. Click OK

RootFolder

No luck with the Hyper-V MP, the root folder is internal and it doesn't have any other folders so in this case we'll have to build out a parallel MP that has our new information in it.  For Hyper-V it's not a big deal since there are only the 3 state views, for an MP like SQL Server, luck is on our side the root folder is public so we can extend that MP directly.

Another way to do this is to use the MP Viewer tool that you can get from here http://blogs.msdn.com/boris_yanushpolsky/archive/2008/01/31/mpviewer-1-3.aspx 

To create the new folder, simply follow the previous steps, but give your folder a more precise name like "BridgeWays Windows Hyper-V" and set the parent folder to be Microsoft.SystemCenter.Monitoring.ViewFolder.Root .  Now we have a new root folder for any views we want to create.

Now let's create a duplicate state view within our new folder.  This state view will simply duplicate the same information as the Hyper-V MP shows in the Server Role View.  I'm doing this because I know I'll be adding a number of monitors as well as performance views and I don't want to have to switch from one folder to another when I'm watching the environment.  The Hyper-V MP only has 3 state views so it's not a big deal to duplicate them.

  1. Right click on the new folder (BridgeWays.Windows.HyperV.Root in my case) and select New->State View
  2. Give it a new ID postfix, such as ServerRole.State
  3. Give it a Display name, such as "Server Role State"
  4. Click the ellipses by Target and select the target we want to show in the state view, in this case Microsoft.Windows.HyperV.ServerRole
  5. Click Finish

That's it, we've just duplicated the Server Role View from the Hyper-V MP to our new custom MP.  The beauty of this is we don't have to redo the discoveries or anything because the data is already being populated by the core MP.

For the next post, we'll look at adding our own monitors to the discovered servers.

Part 1: Getting Started with writing a more robust Hyper-V MP
Part 2: Adding your own Monitors
Part 3: Adding Rules and Performance Views
Part 4: Adding Dashboards

Posted on February 04, 2010 at 03:43 PM in Operations Manager, Technology | Permalink | Comments (0) | TrackBack (0)

Reblog (0) | Digg This | Save to del.icio.us | Tweet This!

Next »

Subscribe

  • Subscribe to this blog's feed

Sites We Like

  • System Center Central
  • Bridgeways Management Packs

Categories

  • BridgeWays
  • Debugging
  • Hyper-V
  • Management Packs
  • Operations Manager
  • SCOM
  • Technology