Sie sind auf Seite 1von 7

DynamicComputergroupsthat sendheartbeatalerts

Instructionsforcreatingdynamiccomputergroups thatsendheartbeatalertswhenaserverisoffline

Author: TimMcFadden,MCSE timpmcfadden@gmail.com http://www.scom2k7.com Version:1.0 August23,2008

Introduction SomethingthathasalwayspuzzledmewithMOM2005andnowSystemCenter OperationsManager2007isthatwhenIcreateadynamicgroupofcomputersandoneof thecomputersgoesofflineIdontgetaheartbeat.Thisseemslikesomethingthatshould workoutoftheboxasallothermonitorsaredependentupontheserverbeingup.Last yearIpostedatoolcalledthewatchanatorthataddressedthisissue.Thewatchanator workedwellbutwascomplicatedtosetupandneededtoberuneverytimethedynamic groupchanged.WellnowIhaveabettersolution.Thisnewsolutionmayseemalittle complicatedaswellfirstbutisreallyveryeasyifyoufollowmysimplesteps. 1. Createthedynamicgroupusingthegroupwizard. a. Giveyourdynamicgroupanameandselecttheunsealedmanagementpack youwanttostorethegroupin.

b. OntheExplicitMemberstabclicknext. c. OntheDynamicMemberstabclick andcreatetheformula youwanttousetocreateyoudynamicgroup.Iusedasimpleonethat dynamicallyincludesallofmyexchangeservers.

d. Fromthegroupswindow,rightclicktoverifythatyourdynamicgroup includesthecomputersyouwant.

Asyoucanseethedynamicgrouponlycontainswindowsserversanddoesnotcontainthe heartbeatobject (oragentwatcherasitisknowinscom)

2. ExporttheManagementpack

3. OpenuptheManagementpackinanyxmleditor.Iamusingvisualstudio

4. Searchfor<MembershipRules>.Themembershiprulesmakeupthedynamic group.Asyoucanseethefirstmembershiprulebetween<MembershipRule> and</MembershipRule>containstheformulathatcreatesmydynamicgroup. 5. Nowweneedtoaddthecodetoincludethehealthwatchers.Openup watchers.xmlavailableat http://www.scom2k7.com/downloads/watchers.xmlandcopythexmlcode. Hereisthecode.


<MembershipRule> <MonitoringClass>$MPElement[Name="SystemCenter!Microsoft.SystemCenter.HealthServiceWatcher"]$</M onitoringClass> <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary6062780!Microsoft.Sys temCenter.InstanceGroupContainsEntities"]$</RelationshipClass> <Expression> <Contains> <MonitoringClass>$MPElement[Name="SystemCenter!Microsoft.SystemCenter.HealthService"]$</Monitoring Class> <Expression> <Contained> <MonitoringClass>$MPElement[Name="MicrosoftWindowsLibrary6062780!Microsoft.Windows.Comp uter"]$</MonitoringClass> <Expression>

<Contained> <MonitoringClass>$Target/Id$</MonitoringClass> </Contained> </Expression> </Contained> </Expression> </Contains> </Expression> </MembershipRule>

6. Pastethiscodeafterthefirst</MembershipRule>andbefore </MembershipRules>thensavethefile. *NoteifyouchooseanotherclassotherthanMicrosoft.Windows.Computerto createyoudynamicgroupyouwillhavetoreplacethelinefromwatchers.xml withthematchinglineinyourdynamicgroupmembershiprule. <MonitoringClass>$MPElement[Name="MicrosoftWindowsLibrary6062780!Microsoft.Wi ndows.Computer"]$</MonitoringClass> 7. SavetheMPandreimporttheManagementPackintoSCOM.

8. GobacktoyourgroupandrightclickViewgroupmembers

9. Thehealthwatchersmayupto20secondstopopulate.PushF5acoupleof timestorefreshthescreen.

Nowwhenwecreateasubscriptiontothisgroupandaserverinthegroupgoesoffline, wewillnowgettheheartbeatalert.

Das könnte Ihnen auch gefallen