9 May 2008

MOM 2005: Agent heartbeat failures

Steve Rachui wrote a great blog about Agent heartbeat detection in MOM. While I have always understood the way MOM deals with heartbeat failures, explaining to someone who doesn't understand MOM hasn't been all that easy, and this article will help with that.

And, if your organisation is anything like ours, you will have placed your servers into custom groups for notification purposes. John Hann shared a great script for dealing with these custom notification groups.

The only change I have made to the script (other than to cater for my 40+ notifications groups), is to remove the Exit for clause.

Original script:

For Each Group In GetGroupsForComputer
If Group.name = "Our - Server Ops" Then
CreateEvent (33001)
Exit For
End If
If Group.name = "Our - AD Ops" Then
CreateEvent (33002)
Exit For
End If
If Group.name = "Our - SMS Ops" Then
CreateEvent (33003)
Exit For
End If
If Group.name = "Our – SQL Ops" Then
CreateEvent (33004)
Exit For
End If
Next

My version:

For Each Group In GetGroupsForComputer
If Group.name = "Our - Server Ops" Then
CreateEvent (33001)
End If
If Group.name = "Our - AD Ops" Then
CreateEvent (33002)
End If
If Group.name = "Our - SMS Ops" Then
CreateEvent (33003)
End If
If Group.name = "Our – SQL Ops" Then
CreateEvent (33004)
End If
Next

The reason for this is simple:

Certain servers may reside in multiple groups, with different people responsible for each group. With the Exit for clause in tact, the script will stop processing after the first group found, and will not generate the additional events.

No comments:

Related Posts with Thumbnails