About Tao Yang

Posts by Tao Yang:

0

Using Computers And Health Service Watchers Groups in a Management Group containing Clusters

Posted by Tao Yang on 23/04/2014 in SCOM |

It’s very common for OpsMgr administrators to create instance groups contain windows computer objects and the health service watcher objects for these computers so these groups can be used in alert subscriptions for different support teams. There are many articles out there explaining how to create these groups such as:

http://www.scom2k7.com/dynamic-computer-groups-that-send-heartbeat-alerts/

http://blogs.technet.com/b/kevinholman/archive/2014/04/09/creating-groups-of-health-service-watcher-objects-based-on-other-groups.aspx

Please keep in mind, if there are clusters monitored in your environment, and you’d like to include cluster alerts in the subscriptions you’ve setup, these groups do not contain windows clusters so subscriptions will not process some of the cluster alerts. I noticed it last week when I was configuring Alert Update Connectors using such groups, some of the cluster alerts are not processed such as this one:

Cluster Alert

This is because clusters are actually groups.

Class Definition in Windows Cluster Management MP:

image

In Operations console:

image

As you can see each discovered Windows cluster is a group, and it contains all cluster resources:

SNAGHTML66a977a

So in order for the “Computer and Health Service Watcher” instance groups to include clusters, the GroupPopulator in the group discovery data source needs to be updated to include an additional <MemberShipRule> segment. in the example below, I’ve created a group that contains all computers with the NetBIOS name starts with the letter “S”, associated health service watcher objects, and all clusters with the name starts with letter “S” as well:

image

Of course, in order to add highlighted section in the discovery, I also added the Microsoft.Windows.Cluster.Library as a reference (with alias “Cluster”):

image

Here’s the XML code for the group discovery if you want to copy and paste:

  <Monitoring>
    <Discoveries>
      <Discovery ID="Demo.CompAndHSW.Instance.Group.Discovery" Enabled="true" Target="Demo.CompAndHSW.Instance.Group" ConfirmDelivery="false" Remotable="true" Priority="Normal">
        <Category>Discovery</Category>
        <DiscoveryTypes />
        <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
          <RuleId>$MPElement$</RuleId>
          <GroupInstanceId>$MPElement[Name="Demo.CompAndHSW.Instance.Group"]$</GroupInstanceId>
          <MembershipRules>
            <MembershipRule>
              <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
              <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
              <Expression>
                <RegExExpression>
                  <ValueExpression>
                    <Property>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$</Property>
                  </ValueExpression>
                  <Operator>MatchesRegularExpression</Operator>
                  <Pattern>^[Ss]</Pattern>
                </RegExExpression>
              </Expression>
            </MembershipRule>
            <MembershipRule>
              <MonitoringClass>$MPElement[Name="SC!Microsoft.SystemCenter.HealthServiceWatcher"]$</MonitoringClass>
              <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
              <Expression>
                <Contains>
                  <MonitoringClass>$MPElement[Name="SC!Microsoft.SystemCenter.HealthService"]$</MonitoringClass>
                  <Expression>
                    <Contained>
                      <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
                      <Expression>
                        <Contained>
                          <MonitoringClass>$Target/Id$</MonitoringClass>
                        </Contained>
                      </Expression>
                    </Contained>
                  </Expression>
                </Contains>
              </Expression>
            </MembershipRule>
            <MembershipRule>
              <MonitoringClass>$MPElement[Name="Cluster!Microsoft.Windows.Cluster"]$</MonitoringClass>
              <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
              <Expression>
                <RegExExpression>
                  <ValueExpression>
                    <Property>$MPElement[Name="Cluster!Microsoft.Windows.Cluster"]/Name$</Property>
                  </ValueExpression>
                  <Operator>MatchesRegularExpression</Operator>
                  <Pattern>^[Ss]</Pattern>
                </RegExExpression>
              </Expression>
            </MembershipRule>
          </MembershipRules>
        </DataSource>
      </Discovery>
    </Discoveries>
  </Monitoring>

Once the additional <MembershipRule> segement is added to the GroupPopulator module, all windows clusters will be shown as child groups for both my custom defined group and the “Windows Clusters” group:

SNAGHTML67d6784

Lastly, if you are updating a existing group, don’t forget to change the display name to something like “Computers, Clusters and Health Service Watchers Group” :)

Tags:

0

My Experience Migrating Hyper-V Clusters Using System Center Orchestrator 2012

Posted by Tao Yang on 21/04/2014 in Hyper-V, PowerShell, SC Orchestrator |

Back in August / September last year, I spent sometime designed a set of Orchestrator runbooks to migrate Window Server 2008 R2 Hyper-V clusters to Windows Server 2012. I wasn’t going to blog this because it was designed to only cater for my company’s environment, not something that’s generic enough for everyone to use. I […]

Tags: ,

0

Programmatically Generating the OpsMgr 2012 Alert Update Connector Configuration XML

Posted by Tao Yang on 19/04/2014 in SCOM |

Background After been working on a project for over a year, I’ve start to see some light at the end of the tunnel. The last task I have in order to production-transition the 4 OpsMgr 2012 R2 management groups that I have designed and built is to configure integration between our ticket logging tool and […]

Tags: ,

0

PowerShell Functions: Get OpsMgr Alert Generating Rules and Monitors

Posted by Tao Yang on 12/04/2014 in PowerShell, SCOM |

This is my second post today. Bad weather, both wife and daughter have got flu. So I’m sitting home catching up with blogs… I wrote 2 functions as part of a PowerShell script I’ve been working on: Get-AlertRules and Get-AlertMonitors. As the names suggest, these two functions get all Rules / Monitors of a particular […]

Tags: ,

2

Remotely Powering On and Off My Entire Home Lab

Posted by Tao Yang on 12/04/2014 in PowerShell |

My home lab consists of 3 PCs running Hyper-V and a HP Proliant Microserver N54L running SCVMM. I have previously blogged the lab setup in a 2-part blog posts (Part 1, Part 2). These 2 blog articles was written back in October 2012, although there are few changes in the current setup (new hardware, etc), […]

Tags: ,

0

PowerShell Module to resize console – Updated

Posted by Tao Yang on 08/04/2014 in PowerShell |

Few days ago I wrote a PowerShell module that contains 1 cmdlet / function to resize the PowerShell console windows. It was a quick job that I did less than half an hour. I wrote it primarily to make PowerShell Web Access (PSWA) more user friendly. Over the last couple of days, I spent a […]

Tags: ,

7

PowerShell Module: Resize-Console

Posted by Tao Yang on 05/04/2014 in PowerShell |

I’m currently working on a solution that relies on PowerShell Web Access (Hopefully I can finish tonight and blog it in next couple of days). I have been a bit hesitate to use use PWSA every since I firstly tried it out briefly back in 2012 (and blogged my experience here). Why am I hesitated? […]

Tags: ,

1

SQL DB Engines Not Discovered in SCOM and My Troubleshooting Experiences

Posted by Tao Yang on 03/04/2014 in SCOM |

Few days ago while I was in the OpsMgr 2012 console, I realised that all 3 SQL clusters hosting my OpsMgr Ops DBs are not discovered by MS SQL management packs. All other SQL clusters with same version of SQL got discovered (i.e. clusters hosting ConfigMgr 2012 site databases, etc.). Since I backup both sealed […]

Tags:

3

VMware Windows Guest Management Pack

Posted by Tao Yang on 03/04/2014 in SCOM |

This Monday, I was configuring monitoring for all our System Center 2012 servers as per our Windows support team’s requirement. Since all the virtual machines for our System Center 2012 servers are hosted on VMware ESX, they want to monitor the VMware Tools service on these guest VM’s. Since it was Monday morning and I […]

Tags: ,

1

Discovery for MS Clusters of Any Kind

Posted by Tao Yang on 29/03/2014 in SCOM |

Often when developing an OpsMgr management pack for server class applications, we need to be cluster-aware. Sometimes workflows don’t need to run on a cluster, sometimes, the workflow should only be executed on a cluster. (i.e. I wrote a monitor that runs on a Windows 2008 R2 Hyper-V cluster once a day and check if […]

Tags: ,

Copyright © 2010-2014 Tao Yang's System Management Blog All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.2.4.1, from BuyNowShop.com.