XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Home  » MP Development  » XML Help: Dist App Model with Dynamic Group with multiple membership criteria

XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Tue, Sep 29, 2009 7:06 AM :: Rank: 61
Author
Points: 42868
Level: System Center Expert

 Moving this to MP authoring where it belongs....someone bail me out please!!!!

I've read Brian Wren's post on dynamic component groups in distributed application models, but I wonder if I can go one step further.

I need to create a component group in my DAD model that includes the health service only for computers that are members of 'Active Directory 2003 Domain Controllers'.

 What Wren demonstrates populates only the computers based on properties of that class. What I want to do is match based on a group that contains Windows OS objects and populate with those computers Health Service...

Specifically, I need to create a Component Group in the DAD Model that contains objects of the Health Service class. However, I only want the Health Service objects of computers that are members of the Active Directory 2003 Domain Controllers group.

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Tue, Sep 29, 2009 11:10 AM :: Rank: 34
Author
Points: 65652
Level: System Center Expert

Tommy, because you are trying to filter membership based on group membership of one object class (computer or server role or operating system) before including the nodes Health Service in a group. 

Because of the initial group membership filter, it seems to me programmatic means are the only way this can be populated, which would not be dynamic.

Tenchuu, what say you?

   Report Abuse
Re: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 5:32 AM :: Rank: 32
Author
Points: 27764
Level: System Center Expert
I'm thinking about some AND-Condition, but I really have no clue how to do that one.

What I can think of is reverse-engineering the DC-MP and taking that Expression for the Group relatively just checking the condition in the Group itself.

But that's just a guess, never tried something like that. Currently in a MP Authoring course with Brian Wren and I don't have much time here since this thing is far away from boring :)
   Report Abuse
Re: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 5:48 AM :: Rank: 33
Author
Points: 27764
Level: System Center Expert
Can't modify my post ^^

What is this for anyway? I mean, what are you trying to achieve.
   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 6:34 AM :: Rank: 39
Author
Points: 42868
Level: System Center Expert

 We are doing "user perspective" monitoring with AD Client monitoring, Web and OLE templates and Info Worker MP (which has an Outlook to Exchange check).

What I also wanted to add in the DAD Model  is a component group that I would  call 'Network Connectivity client perspective'. I would like this component group to contain only the Health Service Watcher of the Vista workstations that are actually doing the client perspective monitoring.

While I understand checking network devices themselves, I am not allowed to mess with those. So, if I can show when HSW says agent is 'down and not pingable', that is as close I will get.

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 7:30 AM :: Rank: 32
Author
Points: 1502
Level: System Center Specialist

Tommy

This is possible in XML. And if required, any combination of nested AND as well as OR is allowed based on the following:

  • class of an object
  • properties of an object
  • properties of the host of an object
  • members of an object (e.g. a group containing objects with certain properties)
  • parents of an object (e.g. groups, an object is member of)

On top of that a single GroupCalc rule may contain more than a single membership clause (effectively resulting in an OR condition).

Some time ago I posted some examples of such GroupCalc XML bits as a note to myself: http://rburri.wordpress.com/2009/01/14/dynamic-group-membership-authoring-and-performance-impact-on-rms/ (check the PDFs on there).  In your case you'd probably need something like:

"HSW" contains "HS" (maxDepth="1") contained_in "YOUR_GROUP" (maxDepth="2")

In English: HSW that contain HS which are members of YOUR_GROUP (two levels deep).

These statements are a bit difficult to test as MPVerify doesn't completely check them, Be sure to closely watch the event log of your RMS (which does the calculation) for event ID 4509 after importing an MP containing such a rule.

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 7:31 AM :: Rank: 48
Author
Points: 65652
Level: System Center Expert

 I've gone over this OpsMgr DAD model situation you've described, and filtering first based on group and then on class is something I think could only be done programmatically.

I think the solution would be programmatic update of the DAD model (not sure how you'd code this), and then update / reimport the MP containing the model. Sounds like a potential consulting gig for Tenchuu and his CodeSmith C# magic to me.

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 7:46 AM :: Rank: 42
Author
Points: 65652
Level: System Center Expert

 Raphael,  check me on this if you would based on your XML genius. From your site, he would need to use 

This one to filter out the members of  the group?

Children of an object (Contains / NotContains)

Example:  Contains.Group.DiscoveryRule.xml    

 

 And  this one to include the members of the class?

Object’s class membership (MonitoringClass)

 


   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Wed, Sep 30, 2009 9:25 AM :: Rank: 49
Author
Points: 1502
Level: System Center Specialist

Pete

The problem is that only HS are member of the computer group. The HSW are not. Hence you need to start with the HSW, evaluate the HS reference and then look back to check the HS for a computer group membership. I've changed the example a bit and added some comments in the XML (see attachment).

The nested formula example on my post even goes a bit further as it has two group rules. The first populated the element with computers - and the second adds the HSWs to go along. That's been documented by others to group HSW's and computer objects together. Very handy for subscriptions or alert views when HSW alerts need to be included with computer alerts.

UPDATE:

Replaced the sample with a complete MP. Comments are in the XML file.

  • DistApp Service: Your.DAD.Servie
  • DistApp Component Group: Your.DAD.ComponentGroup
  • Computergroup: Your.Windows.Computergroup

The MP populates a computergroup. The DistApp service's component group is then populated with Health Service Watcher objects that watch the computers in the computer group.

 

 

 

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 7:10 AM :: Rank: 44
Author
Points: 42868
Level: System Center Expert

 Raphael, I am somewhat lost on a couple of points... 

Does "maxdepth" refer to the number of levels beneath the target computer the object lies? 

Does the maxdepth need to be exactly right to work, or just greater than some value

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 9:04 AM :: Rank: 56
Author
Points: 1502
Level: System Center Specialist

maxDepth declares how deep into a nested structure a Contains/NotContains clause looks. You could leave it out which would mean it would look down as far as relationships exist. For performance reason (the RMS has to do all the work) I recommend setting to as low a value as possible.

maxDepth="1" --> direct membership (e.g. a computer is a driect member of a computer group)

maxDepth="2" --> direct or "grand child" (e.g. the HS is a "grand child" of a computer group)

When using Contained/NotContained then it works all the same but looking outward.

   Report Abuse
Re: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 10:29 AM :: Rank: 52
Author
Points: 27764
Level: System Center Expert
I currently have time to look at that and it's driving me nuts. What I can say so far however is, you won't be able to define a Group with an AND condition for 2 different classes. Of course this totally makes sense.

However, you could maybe work towards this if your DCs had some kind of wildcard in them like "Computername-DC.yourdomain.local"
   Report Abuse
Re: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 12:00 PM :: Rank: 62
Author
Points: 27764
Level: System Center Expert
What I was trying to do now is just setting the Populator Discovery to something like Displayname matches Wildcard *, however. I don't get objects with that ^^

I created a group and there it works so the big question is, can you even use Expressions in Group Populator Groups?

Next thing, I then thought I could just disable the Discovery and create an Override for the group but that won't work since the Discoveries for Groups are running on the Server and not on the Client.

I see no way around this.

Could someone try a simple Expression in the Group Populator there, I start questioning myself right now ^^
   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 3:29 PM :: Rank: 47
Author
Points: 65652
Level: System Center Expert

I am striking out on the last example with the group member and class requirement to populate a component group just now as well...the others are working for me.

 

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 4:21 PM :: Rank: 51
Author
Points: 1502
Level: System Center Specialist

Guys

If you describe as detailed as possible what exactly you want to achieve (you've lost me by now), I'll see if I can make a fully working example MP for you. What I normally do is creating a 'simple' dynamic group using the wizards and then edit them in XML to get the more advanced stuff done. And these grouping techniques can be used on DistApp elements just as well as on groups.

Raphael

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 4:33 PM :: Rank: 50
Author
Points: 65652
Level: System Center Expert

 You lost me first!     I'll post something overnight Zurich time. 

Cheers, 

Pete

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Thu, Oct 01, 2009 11:55 PM :: Rank: 67
Author
Points: 65652
Level: System Center Expert

 Raphael, can you  demonstrate a concrete example, such as 

A component group containing only Health Service Watcher instances for which the associated Computer object is a member of Microsoft.Windows.Server.2003.ComputerGroup?

   Report Abuse
Re: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Fri, Oct 02, 2009 3:42 AM :: Rank: 44
Author
Points: 27764
Level: System Center Expert
OK erm, little Update :)

The problem why my criteria wasn't working because I was always checking it in the Designer and not in the Diagram View. In the Diagram View it works just fine.

However, we still have the limitation of 1 class per AND expression and there's no way around it. You can try that in the Group Criteria Wizard, if you change it to AND it'll just change back to OR. If you do it in the XML it'll throw errors at you.



But, the class is hosted by Windows.Computer (I think it was Windows Computer) therefore you can work also with these properties. Question is, is there a property for "IS-DC". If not, you can always create your own extended Class.



I can still think of some fancy Ninja-Style Discovery which adds the Machines programmatically through SDK but there must be an easier way besides that this would be quite a mess.

Btw., Codesmith wouldn't do the Job here, besides that Stefan Köll is the Mastermind that set up the Concept of creating the MPs programmatically with it, I was just extending it.
   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Fri, Oct 02, 2009 4:59 AM :: Rank: 112
Author
Points: 1502
Level: System Center Specialist

Voilà:

The MP first populates a computergroup with Windows Server 2003 objects of a named domain. You must change that discovery's matching expression to a domain which exists in your environment or that computergroup will remain empty.

The Component Group is then filled with Health Service Watcher objects that watch computers in above group.

This MP is complete with the DistApp Service, the Component Group, a Computer Group and Health Roll Up.

Note that if you change anything in the GUI tools you'll loose the embedded comments in the XML code. Especially do not attempt to open this DistAp in the designer! And I should mention that it has taken me well over an hour to write this and test it. Unfortunately such dynamic groupings aren't a 10 seconds and 2 click job (yet).

Next challenge?

   Report Abuse
RE: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Fri, Oct 02, 2009 6:36 AM :: Rank: 75
Author
Points: 1502
Level: System Center Specialist

Tenchuu

What exactly are you trying to do with the AND condition? I am almost sure that there is a workaround. So far I haven't found myself in a situation where dynamic grouping wasn't possible - if there exists some sort of relationship between objects.

   Report Abuse
Re: XML Help: Dist App Model with Dynamic Group with multiple membership criteria
Posted: Fri, Oct 02, 2009 7:42 AM :: Rank: 66
Author
Points: 27764
Level: System Center Expert
Nevermind, I was approaching it in a few ways and went down the Trial&Error Path. I thought about a fancy solution like that of yours but had absolutely no clue how I could target just the members of the group. My problem was maybe that I was targeting the SC!Microsoft.SystemCenter.HealthService class too soon.

Thanks for that example, I'm quite sure I'm going to need it somewhere as well. Still need some time to fully understand it though, what's confusing me is the Relationship you use there.
   Report Abuse

Home  » MP Development  » XML Help: Dist App Model with Dynamic Group with multiple membership criteria
30 Items Page [1]  2      
Top Contributors
Featured Members
Pete Zerger
Points: 65652
Level: System Center Expert
Tommy Gunn
Points: 42868
Level: System Center Expert
Simon Skinner
Points: 40804
Level: System Center Expert
Stefan Koell
Points: 28999
Level: System Center Expert
Andreas Zuckerhut
Points: 27764
Level: System Center Expert