SCOM Dynamic Group

H S 216 Reputation points
2021-02-24T06:03:52.757+00:00

Hello

In SCOM I have a Class "MyClass" with a property "WebSiteName".
The Discovery is base on an Microsoft.Windows.Computer.

Also their is from MP IIS a Class "IIS Web Site" with some Properties like "Display Name" or "Description" where the Value of "MyClass/WebSiteName" is included.

MyClass: 3 Instances
IIS Web Site 15 Instances

Now I want to create a dynamic Group with all Objects of "IIS Web Site" that are members of "MyClass".
Something like this:

Object is IIS Web Site AND ( Description Equals $MPElement[Name="MyClass"]/Websitename$ )

Is their a possibilty to get the websites in a group that are hosted on an Computer that is member of MyClass?

With my words: I want to create a dynmic group with the Object "Microsoft.Windows.InternetInformationServices.10.0.WebSite" for all Computer that are containted in "MyClass".

rg
Hansi

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,413 questions
0 comments No comments
{count} votes

Accepted answer
  1. CyrAz 5,176 Reputation points
    2021-02-24T16:03:03.947+00:00

    I have two ideas on how to do that, both require authoring but the first one will definitely be easier than the second one.
    However, could you first clarify what you mean by I want to create a dynmic group with the Object "Microsoft.Windows.InternetInformationServices.10.0.WebSite" for all Computer that are containted in "MyClass"." ?
    Do yo mean that "MyClass" is a class hosted by or contained by the Windows Computer class, and that you would like the group to contain all the IIS WebSites that are contained in the same computer?
    If yes, that can be achieved fairly easily with a group using contains/contained syntax : https://kevinholman.com/2020/07/09/how-to-create-a-scom-group-of-disks-that-are-related-to-an-application-using-contained-and-contains/

    The second option involves some pretty advanced authoring so I would rather avoid going into lengthy explanations if they are not required ;)

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. H S 216 Reputation points
    2021-02-25T12:37:45.197+00:00

    Hello!

    Thank you for reply.
    Yes this is what I want.
    Here is my Code:

    <ClassType ID="MyServer.Class" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.LocalApplication" Hosted="true" Singleton="false" Extension="false">
    <ClassType ID="IISdynamic.Group" Accessibility="Public" Abstract="false" Base="MSIL!Microsoft.SystemCenter.InstanceGroup" Hosted="false" Singleton="true" Extension="false" />
    
    <Discovery ID="IISdynamic.Group.Discovery" Enabled="true" Target="GRZ.SquaredUp.IISdynamic.Group" ConfirmDelivery="false" Remotable="true" Priority="Normal">
     <Category>Discovery</Category>
     <DiscoveryTypes>
       <DiscoveryRelationship TypeID="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities" />
     </DiscoveryTypes>
     <DataSource ID="GroupPopulationDataSource" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
     <RuleId>$MPElement$</RuleId>
     <GroupInstanceId>$MPElement[Name="IISdynamic.Group"]$</GroupInstanceId>
     <MembershipRules>
     <MembershipRule>
     <MonitoringClass>$MPElement[Name="MWIS!Microsoft.Windows.InternetInformationServices.10.0.ApplicationPool"]$</MonitoringClass>
     <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
     <Expression>
     <Contained>
     <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
     <Expression>
     <Contains>
     <MonitoringClass>$MPElement[Name="MyServer.Class"]$</MonitoringClass>
     </Contains>
     </Expression>
     </Contained>
     </Expression>
     </MembershipRule>
     </MembershipRules>
    </DataSource>
    </Discovery>
    
    0 comments No comments