Menu Close

Authoring SCOM groups – from simple to complex


I have written many individual blog posts on creating and using groups.  I wanted to take this post to put them all in one place – the most common examples of “how-to” create groups for all kinds of common scenarios.  Some of these are super simple.  Some are overly complex, and provide us a challenge to make using the UI and Authoring console much simpler for these common monitoring tasks.

 

You will undoubtedly create lots of Groups in OpsMgr.  The most common reasons you need groups in OpsMgr are:

  • To scope overrides to a specific subset of computers
  • To scope alert notifications or product connector subscriptions for a specific set of computers
  • To scope user consoles, so they only see the servers they are responsible for.
  • To scope a set of Computers that need to go into a scheduled maintenance mode.
  • To scope application views only to computers that host a given application.
  • To create a rollup Health State view of an otherwise disconnected subset of computers.
  • To create a set of computers for a report

 

The most common object you will place in your groups are Windows Computer objects.  The most common way to dynamically assign computers to the groups is by using a property of the Windows Computer class.  I give examples of that here:

https://kevinholman.com/2008/02/05/creating-a-group-based-on-ou-organizational-unit-in-active-directory/

Then – to assist with some complex dynamic assignments, Cameron and I show how to use some RegEx to simplify things:

https://kevinholman.com/2009/04/21/quick-tip-using-regular-expressions-in-a-dynamic-group/

Creating Dynamic Groups using Regular expressions

 

For some advanced examples of grouping other types of objects, using the AND/OR clauses, and how to group objects by their Host I give some examples:

https://kevinholman.com/2009/11/04/making-groups-of-logical-disks-an-example-from-simple-to-advanced/

A very popular concept is creating registry entries on monitored servers, to give us new criteria for grouping these servers which otherwise did not exist:

https://kevinholman.com/2009/06/10/creating-custom-dynamic-computer-groups-based-on-registry-keys-on-agents/

 

However – sometimes – NONE of these above give you exactly what you need in your groups….  for anything beyond this, you REALLY need to get into the XML and authoring console.  So to make that a little simpler, I started a primer on the XML components of a group, so you can better understand what makes up a group anyway:

https://kevinholman.com/2009/02/05/what-is-a-group-anyway/

Once you have that fundamental understanding – you can start using the Authoring console and XML to create more advanced groups.

Probably the most common advanced group request I see – is how to add the Healthservice Watcher object to a group, for every Windows Computer that exists in the group already.  This is MANDATORY for scoping notification and including the “Heartbeat Failure” and “Server down” alerts.  Tim McFadden has done the best job on that topic:

Dynamic Computer Groups that send Heartbeat Alerts

Sometimes you might want to populate groups from an external source, like a CMDB or AD (this can be a lot more complicated)

https://kevinholman.com/2017/10/12/how-to-create-a-scom-group-from-a-sql-cmdb-query/

https://kevinholman.com/2017/08/26/how-to-create-a-scom-group-from-an-active-directory-computer-group/

Steve followed up with how to do the same thing from a Text file source:

Populating groups from a text file

As you start authoring your own custom application management packs, you will often find you need to be able to create a group of Windows Computer objects, for all Computers that host that application you are discovering.  Jonathan Almquist does an outstanding job of documenting this:

How to create a Computer Group in the R2 Authoring Console

As you get more advanced in authoring custom management packs, you might find that you want to create groups for specific applications, application roles, and application components.  For this – an instance group is a better choice:

How to create an Instance Group in the R2 Authoring Console

What about something that should be REALLY easy – but isn’t?  Supposed you want to create a group of Windows Computers… but not ALL of them has host an application, maybe on a subset of them based on criteria of some OTHER class?  This is more common than you might realized and SHOULD be very simple to do in the UI console… but isn’t.  Again – we will refer to Jonathan’s blog on this topic for an excellent walk through:

How to create a group of Windows Computers based on a discovered property of any class

Another twist – what if you want to create a group of logical disks, but ONLY if they are disks on a SQL or Exchange server?

https://kevinholman.com/2010/09/09/how-to-create-a-group-of-objects-that-are-contained-by-some-other-group/

Here is a similar scenario – what if you want to create a group of all your Windows Computers, that are NOT a specific member of another special group?

https://kevinholman.com/2012/03/09/opsmgr-how-to-create-a-group-of-all-windows-computers-that-are-not-a-member-of-another-group/

 

I am sure there are lots of other good posts on groups out there as well.  These are just the most common scenarios I have run into.  If you know of a concept of using or creating groups that isn’t covered here, I’d love to hear about it and get it added to this post.

https://kevinholman.com/2014/01/12/creating-groups-of-computers-based-on-time-zone/

https://kevinholman.com/2014/04/09/creating-groups-of-health-service-watcher-objects-based-on-other-groups/

https://kevinholman.com/2009/11/04/making-groups-of-logical-disks-an-example-from-simple-to-advanced/

 

 

Lastly – a warning.  Don’t go crazy with too many groups.  A group is a singleton class hosted by the RMS, and the RMS must perform Group Calculation for each group on a regular basis.  You can destroy OpsMgr performance by having way too many groups, or by having complex criteria formatted in such a way that it places a load to perform the calculation.  There are a few articles on this topic…. but my advice:

  • Only create groups for what you absolutely need groups for.  Don’t create groups “to get organized” if you aren’t absolutely using those groups.
  • Try and keep the number of groups under 1000.  There is only a certain number of custom groups that are performance tested.  Beyond that – you might see performance issues that are unknown.
  • Keep your dynamic membership criteria SIMPLE.
  • Don’t create too many groups with massive memberships.

Slow Group Calculation

Finding those heavy group discoveries

14 Comments

  1. Nima

    Hi Kevin,
    since this article is quite a few years old, I’m curious. Do you still advise against creating a lot of groups? I’m thinking about having an ” Computers Group” that will have sub groups within it of different functions of environments that make up that entire applications computer inventory. We have a lot of application teams that we work with so if creating a lot of groups is still a concern when it comes to performance I will avoid that route.

    • Kevin Holman

      The advice still holds. Too many groups especially with complex membership expressions can cause slowness in large environments. It depends on how many groups we are talking about. 500? 1000?

      I still have yet to need a good need for sub-groups in SCOM. Creating groups of Windows that contain an application, is VERY normal, and common, however. But creating lots of groups because the SCOM Admin likes to pre-create things just for organizing sake, is a mistake. Create the groups you NEED, not ones you dont use yet.

      • Dwayne

        you can reduce the performance hit by slowing down how often scom calculates groups. on large environments the default will absolutely kill performance. its yet another ‘hidden’ registry key, but cutting it back to 30min can see a significant reduction in that performance hit, and honestly sub 1 min to 30min doesn’t matter enough in most situation.

  2. Steven

    Hi Kevin,

    I have started creating some MP to pull more operational information into SCOM, I am now needing to create groups for this information for overrides and maintenance modes, i can do it easy enough in the MP one group at a time based on the windows attribute, but i am wondering if there is a way to create a MP that can auto create groups based on what properties exist in the Attribute, similar to how the WIndows Cluster creates a group for clusters automatically

    • Dwayne

      automatically as the template tells it to. you would need to create a management pack, setup discoveries, objects etc yourself. then in theory you can.

  3. Michiel

    Hi Kevin,
    Is there a way, perhaps query the database, to measure the resource impact of calculating group members for particular groups. If ‘troublemakers’ can be addressed then adjustments can be made and seen if that works better.
    We are now in kind of a dark.
    Regards,
    Michiel

    • Kevin Holman

      I don’t know a good way of this. It is a common issue/complaint. Normally at MSFT we take SQL traces and then analyze looking for long running queries under group populator module statements. I agree – it would be good if somehow we could bubble this up per group – to find and fix groups that take a lot of resources/time to populate.

  4. Thomas

    Hi Kevin,
    Is it possible to create a group that contains objects based on another group, but fill the group only with objects that are in critical health?
    Regards
    Thomas

    • Kevin Holman

      It is, but likely only using a script – and then I’d still not recommend that because it would cause massive group membership churn. What is the need here?

      • Thomas Reinhardt

        The idea was to create a performance view on this group and include its link in the notifications. There would be only 5-10 critical objects instead of 1000+ which would simplify the handling.

Leave a Reply

Your email address will not be published.