Here is a quick tip on using a regular expression when creating a group.
OpsMgr dynamic inclusion rules are case sensitive.
If I have a group that I want to contain all computers that START with “OM”…. I can use the following expression:
The “^” tells regex to start a new line… without this – it will search the entire computername for “OM” instead of only servers with a name that starts with “OM”. This shows the following group membership:
However – this is not all my “OM” servers. This is because when some were built, they used a lower case name. If I change the dynamic inclusion expression to “^om” I will only see the lower case servers (the NetBIOS Computer name is lower case… not the display name as shown):
Ok – how do I get them ALL in the same group?
There are a couple ways.
One way is to “OR” the two regex queries:
Bingo!
Another way – courtesy of Tim Helton – is to use the regex modifier (?i:) to make it case insensitive:
Which yields:
This should make dynamic groups a bit easier. We can expand this to add the HealthService Watcher objects, which is typical for groups that we will scope notifications to:
Which yields all my Windows Computers, and their Health Service Watcher components.
Regarding regular expression in general in SCOM, if you need to match multiple items, do like Kevin did above, example:
Red Hat Exclude File System Type Expression:
^(xfs)|^(overlay)$
Red Hat Exclude File System Name Expression:
^(\/var\/lib\/docker\/.*)|^(\/var\/lib\/mesos\/.*)$
Thanks for the update Blake.
How to create Dynamic Group for Pattern match’s in Middle in SCOM 2012 R2
EX : DEMFSSERV1 , XEMFSSERV2 , FEMFSSERV3
need to take pattern matching FS as middle name in all above three fileservers . How to write expression in Dynamic Groups ?
How to create Dynamic Group for Pattern match’s in Middle in SCOM 2012 R2
EX : DEMFSSERV1 , XEMFSSERV2 , FEMFSSERV3
need to take pattern matching FS in all above three esrvers . How to write expression in Dynamic Groups ?
How to make suppressions with Dynamic Groups in SCOM 2012 R2 ?
Is it required to add the Group to rule or Monitor ?
How to make suppressions with Dynamic Groups in SCOM 2012 R2 ?
Is it required to add the Group to rule or Monitor ?