SCOM Resource Pools, part 1: how & why to create one

Creating a SCOM Management Pack is not the hardest thing in the world, as long as you want to monitor something on a single box. There’s an excellent course by Brian Wren on Channel9, and Kevin Holman has made life a whole lot easier by publishing his famous VSAE fragments.

But what if you want to monitor larger entities, like firewall clusters or storage arrays? Preferably by using not a single point of failure? Well, SCOM has a solution for this: Resource Pools. Kevin has written a great blog post on these, detailing how to populate them and what the requirements are, if you want high availability.

Some time ago, we started getting complaints from one of our systems management teams. We have quite a large number of Web Application Availability Monitoring configurations active, and these were using the agents on two dedicated servers. One of these was experiencing problems, causing false alerts. We ended up reinstalling it, but that left us with something I despise: reconfiguring all the web monitors, manually.

That started me thinking about the Resource Pools. What if we could move the web monitors to a Resource Pool? Better yet, what if we could set up our own Resource Pool – and use that to run workflows on as we saw fit? Would that be feasible?

It took some time, but yes – that will work. It turns out that creating your own Resource Pool isn’t even that hard, and using the Powershell scripts from Kevins blog you can populate them with any Management Servers you want to use for this purpose. It’s even possible to include agents – but please keep in mind, Microsoft does not support using agents in a Resource PoolThat being said, we have this exact setup running – without any problems so far.

The XML is quite simple, if you know how to read SCOM MP’s. For obvious reasons, it contains a class for the Resource Pool:

<ClassType ID="MoSt.Custom.ResourcePool.Class" Base="SC!Microsoft.SystemCenter.ManagementServicePool" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true"></ClassType>

There is, however, no way to discover a Resource Pool. The discovery is done by discovering the Resource Pool Watcher:

<ConditionDetection ID="Mapper" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
  <ClassId>$MPElement[Name="SC!Microsoft.SystemCenter.ManagementServicePoolWatcher"]$</ClassId>
    <InstanceSettings>
      <Settings>
        <Setting>
          <Name>$MPElement[Name="SC!Microsoft.SystemCenter.ManagementServicePoolWatcher"]/PoolId$</Name>
          <Value>$Target/Id$</Value>
        </Setting>
        <Setting>
          <Name>$MPElement[Name="SC!Microsoft.SystemCenter.ManagementServiceRuntimePool"]/Name$</Name>
          <Value>Custom Resource Pool by MonitoringStuff</Value>
        </Setting>
        <Setting>
          <Name>$MPElement[Name="SC!Microsoft.SystemCenter.ManagementServicePoolWatcher"]/PoolName$</Name>
          <Value>$Target/Property[Type="System!System.Entity"]/DisplayName$</Value>
        </Setting>
        <Setting>
          <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
          <Value>$Target/Property[Type="System!System.Entity"]/DisplayName$ Watcher</Value>
        </Setting>
      </Settings>
    </InstanceSettings>
</ConditionDetection>

With this XML, you should be able to create a SCOM Resource Pool to provide highly available monitoring ; the complete file is available on Github. However, you might want to wait – I’m working on a complete, sealed MP with some classes that are targeted against this Resource Pool, ready to use.

Keep monitoring!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.