Creating Groups of Health Service Watcher Objects based on other Groups
It has been a well known requirement for most customers, to be able to Create Groups of Windows Computers that also contain corresponding Health Service Watcher objects. This was needed for Alert Notification subscriptions so that different teams could receive alert notifications filtered by groups, but also include alerts from the Watcher, such as Heartbeat failure and Computer Unreachable. There are several articles on this but I will reference a very popular one, on Tims’ site:
Essentially, we needed to add an extra membership rule, to the XML, that would also add any Health Service Watcher objects that have a relationship to the Windows Computer objects already in the group. We did this with the following XML:
However, what if we ONLY want a group of Health Service Watcher objects, and NOT the Windows Computers. BUT – we wish to based the HSW membership list from another group of Windows Computers. This is useful if we want to create availability reports for a group of Windows Computers, but need to based the report on the availability of a specific up/down monitor, and not anything related to Windows Computer objects.
Here is a code example of exactly that:
In this sample – we will create a simple group of Windows Computers, that start with the name “DB”. Then – we will create another group only containing HSW objects, corresponding the SQL computers group.