Friday, March 16, 2012

OpsMgr 2007: Dynamic groups and health watchers

imageI am a big fan of dynamic things that reduce work and, more importantly, human error, and when it comes to grouping devices in OpsMgr I am all for dynamic groupings. The only problem is that, no matter what you do, you cannot include the Windows Computer component and the Health Watcher dynamically in the same group.

Luckily, there is a little workaround for this. Tim McFadden was kind enough to share this detailed guide on how to update your dynamic groups to include the health watchers. The article is a little old by now, so the actual xml that needs to be inserted has updated a little, especially if you have upgraded to OpsMgr 2007 R2.

Herewith the updated version that worked like a dream for us:

<MembershipRule>
<MonitoringClass>$MPElement[Name="SystemCenter!Microsoft.SystemCenter.HealthServiceWatcher"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary6172210!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
<Expression>
<Contains>             
<MonitoringClass>$MPElement[Name="SystemCenter!Microsoft.SystemCenter.HealthService"]$</MonitoringClass>
      <Expression>
<Contained>         
<MonitoringClass>$MPElement[Name="MicrosoftWindowsLibrary6172210!Microsoft.Windows.Computer"]$</MonitoringClass>
          <Expression>
            <Contained>
              <MonitoringClass>$Target/Id$</MonitoringClass>
            </Contained>
          </Expression>
        </Contained>
      </Expression>
    </Contains>
  </Expression>
</MembershipRule>

 

Suddenly this opens a whole new world of possibilities Smile

PS: If you copy and paste from here, it may be a good idea to first paste into Notepad or similar and fixing the quotes before taking into OpsMgr.

No comments:

Related Posts with Thumbnails