Building a “Sample” SCOM Management Pack for Dynamically Building Virtual Machines based on Performance of physical or virtual machines

In today’s post, I will focus on how I worked with our System Center Operations Manager (SCOM) team to build the actual infrastructure and setup alerting for our infrastructure to ensure that if our Configuration Manager Distribution Points (DPs) are getting a high number of connections, we will spin up additional virtual machines to help with the load.

For the most part, there are some requirements that should be in place for this post to be useful:

        Virtual Machine Manager 2008 should be present in your environment
        SCVMM Library has the appropriate Hardware & Guest OS Profiles built along with a template

If you have the above requirements, then you will be able to follow this blog to expand your infrastructure with SCOM 2007 to do active monitoring of your client services and “dynamically” respond to their performance by building additional infrastructure to remove the load.

Example Infrastructure Design for SCOM 2007 (& R2)

First off, I have to give a shout out to my resident SCOM experts – Duncan Ngarachu, JJ Lindner, and Ivan Ivanov – who guided me through getting a better understanding of SCOM.  I knew what I wanted it to do but I wasn’t sure how to articulate how to get SCOM to do it.  Big shout out…

With that said, let’s explain a small-scale design for our SCOM infrastructure for a bit of understanding.  The primary thing that most folks realize is that ConfigMgr infrastructures depend heavily on Active Directory (AD) and this makes the requirement that SCOM has this ability to cross forests where applicable.  For our environment, we have our System Center Virtual Machine Manager (SCVMM) infrastructure & SCOM in a privately hosted domain that has a one-way trust to our service infrastructure.  Because of this, we have to rely on two management servers – one Root Management Server (RMS) and another that is a Gateway server hosted in our services infrastructure domain.


In this scenario, you use Machine Authentication between the SCOM Gateway and SCOM RMS server so you can manage services that exist in the domains where your users getting manage exist.  For the Management Infrastructure, where SCOM & SCVMM servers live, you manage all of your other services.  I will post a blog a bit later that outlines exactly how to setup PKI correctly to support SCOM Gateway as I have found most documentation to not be completely accurate.

NOTE:  You must have the SCVMM and SCOM servers in the same forest or have two-way trusts.  You will also need to ensure that you have a service account in each domain with privileges to take actions in the Services Forest.  You will also need to get SCOM & SCVMM integrated per the following post from Cheng’s Blog.

Downloading & Importing the Management Packs

After you get your SCOM infrastructure planned out and you have the correct infrastructure in place, you will need to move to the next step of downloading and importing your management packs.  For our purposes, I am going to share the management packs that we have installed so that you can take the sample management pack and alter as you see fit.  For now, we have the following management packs as a requirement to get dynamic provisioning working:

Management Pack Name



Microsoft.SystemCenter.DataWarehouse.Library Contains the Definitions and workflows required to support the forwarding of data to the Ops Mgr Data Warehouse.

  Download Here

Microsoft.Windows.Library Assists in tracking, managing, and reporting on your LOB application service level compliance

Download Here

Microsoft.SystemCenter.Library Operations Mgr Management Pack

Download Here

You will notice that we don’t include things like SCVMM, etc. and this is on purpose.  We could have built the management pack to be dependant on the SCVMM class library though every time we would like to modify we would have to “revision” and re-import.  This seemed costly so we included bare miminum though the ones listed above aren’t completely bare either.  However, you need them in order to successfully import.  (This happens when the author – Ivan Ivanov – has these as the defaults for his authoring console and I don’t have the knowledge yet to figure out how to strip them out).

Installing SCOM agents on your Service Infrastructure Servers

The last step is to get agents distributed to your infrastructure pieces you would like to monitor.  SCOM has the ability to extend AD to allow auto deployment but for the purposes of this post I’m going to consider this out of scope.  There is also the ability to discover windows servers and install the agents manually and I will step through this process today.

At minimum, you should install agents on your Virtual Machine Manager server as well as any of your ConfigMgr infrastructure.  This is pre-req to ensuring that you have what you need to get these up and running.

To Install agents manually on your server, do the following:

  1. Open the SCOM Administrators Console
  2. Click Administration
  3. Right-click on Agent Managed, select Discovery Wizard
  4. Select Windows Computers from the device to manage wizardimage
  5. Click Next
  6. Click either Automatic discovery to use Active Directory or advanced to select a specific type of client or server
  7. Click the Domain, and select itimage
  8. For the Administrator account, keep the default to Use selected Management Server Action Accountimage
  9. Click Discover
  10. Select the object and then the agent will install

For more information on installing & discovering servers & clients, see the following KB.

Sample Custom Management Pack for System Center Configuration Manager DPs

After installing your agents, you will notice that all of the pre-defined monitoring groups setup by the management packs for Configuration Manager show no objects (e.g. servers) in your infrastructure.  This is often the case as the discovery logic is broken, I have found, for many of the groups because servers are missing the appropriate registry and\or file settings to get discovered.  You can manually fix this by using SCOM to determine what the discover logic is or you can do your own detection.  For our purposes, we created our own discovery logic that is based on a registry key.

On each of of our DP infrastructure pieces, we have added the following registry key for detection:

imagePath:  HKLM\System\Software\Microsoft

Key:  MPSD (or Org Name)

String Name:  RedmondDP (stands for DPs in Redmond but could be anything)

String Value:  RedmondDP

For our management pack, we have one called DynamicDP that does a discovery of any servers that have this registry key and if detected will then assume it is a DP.  The same logic can be used for a DynamicMP or DynamicSUP with a different management pack which is what we do.

We have some logic setup whereby we create monitors and alerts based on Web Service Concurrent Connections (e.g. the total number of connections open currently on the Web server which is what a DP is).  In this section, we create an alert that says the following:

Throw Alert:

Description of Alert
If connections greater than 30 If 30 concurrent connections exist on a single DP in our environment then create a critical alert.

NOTE:  30 is a very, very low number but is easy to show this in action.  I highly recommended that you use performance data to determine the sweet spot for this number.
If connections stay greater than 30 over 3 samplings If Part A (greater than 30) happens 3 consecutive times then change the health of the server to critical.

NOTE:  Again, 3 is a low sampling rate and for demo-friendly purposes.  However, the concept doesn’t change the fact that you take actions depending on what your threshold is.

As I said, this is a sample but to give you a blueprint I’m going to share out our sample Management Pack XML which you should be able to open in the Authoring Console and modify to your liking.

Code Snippet
  1. <?xml version="1.0" encoding="utf-8"?><ManagementPack ContentReadable="true" xmlns:xsd="" xmlns:xsl="">
  2.   <Manifest>
  3.     <Identity>
  4.       <ID>DynamicProvisionDP</ID>
  5.       <Version></Version>
  6.     </Identity>
  7.     <Name>DynamicProvisionDP</Name>
  8.     <References>
  9.       <Reference Alias="SCDW">
  10.         <ID>Microsoft.SystemCenter.DataWarehouse.Library</ID>
  11.         <Version>6.1.7221.0</Version>
  12.         <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
  13.       </Reference>
  14.       <Reference Alias="Windows">
  15.         <ID>Microsoft.Windows.Library</ID>
  16.         <Version>6.1.7221.0</Version>
  17.         <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
  18.       </Reference>
  19.       <Reference Alias="Performance">
  20.         <ID>System.Performance.Library</ID>
  21.         <Version>6.1.7221.0</Version>
  22.         <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
  23.       </Reference>
  24.       <Reference Alias="System">
  25.         <ID>System.Library</ID>
  26.         <Version>6.1.7221.0</Version>
  27.         <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
  28.       </Reference>
  29.       <Reference Alias="SystemCenter">
  30.         <ID>Microsoft.SystemCenter.Library</ID>
  31.         <Version>6.1.7221.0</Version>
  32.         <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
  33.       </Reference>
  34.       <Reference Alias="SystemHealthLibrary6170430">
  35.         <ID>System.Health.Library</ID>
  36.         <Version>6.1.7221.0</Version>
  37.         <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
  38.       </Reference>
  39.     </References>
  40.   </Manifest>
  41.   <TypeDefinitions>
  42.     <EntityTypes>
  43.       <ClassTypes>
  44.         <ClassType ID="DynamicProvisionDP.RedmondDP" Accessibility="Internal" Abstract="false" Base="Windows!Microsoft.Windows.Server.OperatingSystem" Hosted="true" Singleton="false" />
  45.       </ClassTypes>
  46.     </EntityTypes>
  47.   </TypeDefinitions>
  48.   <Monitoring>
  49.     <Discoveries>
  50.       <Discovery ID="DynamicProvisionDP.RedmondDP_Discovery" Enabled="true" Target="Windows!Microsoft.Windows.Server.OperatingSystem" ConfirmDelivery="false" Remotable="true" Priority="Normal">
  51.         <Category>Discovery</Category>
  52.         <DiscoveryTypes>
  53.           <DiscoveryClass TypeID="DynamicProvisionDP.RedmondDP" />
  54.         </DiscoveryTypes>
  55.         <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
  56.           <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
  57.           <RegistryAttributeDefinitions>
  58.             <RegistryAttributeDefinition>
  59.               <AttributeName>RedmondDP</AttributeName>
  60.               <Path>SOFTWARE\Microsoft\MPSD\RedmondDP</Path>
  61.               <PathType>1</PathType>
  62.               <AttributeType>1</AttributeType>
  63.             </RegistryAttributeDefinition>
  64.           </RegistryAttributeDefinitions>
  65.           <Frequency>3600</Frequency>
  66.           <ClassId>$MPElement[Name="DynamicProvisionDP.RedmondDP"]$</ClassId>
  67.           <InstanceSettings>
  68.             <Settings>
  69.               <Setting>
  70.                 <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
  71.                 <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
  72.               </Setting>
  73.             </Settings>
  74.           </InstanceSettings>
  75.           <Expression>
  76.             <SimpleExpression>
  77.               <ValueExpression>
  78.                 <XPathQuery Type="String">Values/RedmondDP</XPathQuery>
  79.               </ValueExpression>
  80.               <Operator>Equal</Operator>
  81.               <ValueExpression>
  82.                 <Value Type="String">RedmondDP</Value>
  83.               </ValueExpression>
  84.             </SimpleExpression>
  85.           </Expression>
  86.         </DataSource>
  87.       </Discovery>
  88.     </Discoveries>
  89.     <Rules>
  90.       <Rule ID="DynamicProvisionDP.DynamicProvisionDP.DP_ConcurrentConnections" Enabled="true" Target="DynamicProvisionDP.RedmondDP" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
  91.         <Category>PerformanceCollection</Category>
  92.         <DataSources>
  93.           <DataSource ID="DS" TypeID="Performance!System.Performance.OptimizedDataProvider">
  94.             <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
  95.             <CounterName>Current Connections</CounterName>
  96.             <ObjectName>Web Service</ObjectName>
  97.             <InstanceName>_Total</InstanceName>
  98.             <AllInstances>false</AllInstances>
  99.             <Frequency>60</Frequency>
  100.             <Tolerance>0</Tolerance>
  101.             <ToleranceType>Absolute</ToleranceType>
  102.             <MaximumSampleSeparation>1</MaximumSampleSeparation>
  103.           </DataSource>
  104.         </DataSources>
  105.         <WriteActions>
  106.           <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
  107.           <WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />
  108.         </WriteActions>
  109.       </Rule>
  110.     </Rules>
  111.     <Monitors>
  112.       <UnitMonitor ID="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor" Accessibility="Internal" Enabled="true" Target="DynamicProvisionDP.RedmondDP" ParentMonitorID="SystemHealthLibrary6170430!System.Health.EntityState" Remotable="true" Priority="Normal" TypeID="Performance!System.Performance.AverageThreshold" ConfirmDelivery="false">
  113.         <Category>PerformanceHealth</Category>
  114.         <AlertSettings AlertMessage="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor_AlertMessageResourceID">
  115.           <AlertOnState>Error</AlertOnState>
  116.           <AutoResolve>true</AutoResolve>
  117.           <AlertPriority>Normal</AlertPriority>
  118.           <AlertSeverity>Error</AlertSeverity>
  119.           <AlertParameters>
  120.             <AlertParameter1>$Data/Context/InstanceName$</AlertParameter1>
  121.             <AlertParameter2>$Data/Context/ObjectName$</AlertParameter2>
  122.             <AlertParameter3>$Data/Context/CounterName$</AlertParameter3>
  123.             <AlertParameter4>$Data/Context/Value$</AlertParameter4>
  124.             <AlertParameter5>$Data/Context/TimeSampled$</AlertParameter5>
  125.           </AlertParameters>
  126.         </AlertSettings>
  127.         <OperationalStates>
  128.           <OperationalState ID="UnderThreshold" MonitorTypeStateID="UnderThreshold" HealthState="Success" />
  129.           <OperationalState ID="OverThreshold" MonitorTypeStateID="OverThreshold" HealthState="Error" />
  130.         </OperationalStates>
  131.         <Configuration>
  132.           <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
  133.           <CounterName>Current Connections</CounterName>
  134.           <ObjectName>Web Service</ObjectName>
  135.           <InstanceName>_Total</InstanceName>
  136.           <AllInstances>false</AllInstances>
  137.           <Frequency>60</Frequency>
  138.           <Threshold>30</Threshold>
  139.           <NumSamples>3</NumSamples>
  140.         </Configuration>
  141.       </UnitMonitor>
  142.     </Monitors>
  143.     <Recoveries>
  144.       <Recovery ID="MomUIGenaratedRecovery65313795f8d6405ba9e9da455b77898e" Accessibility="Public" Enabled="true" Target="DynamicProvisionDP.RedmondDP" Monitor="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor" ResetMonitor="false" ExecuteOnState="Error" Remotable="true" Timeout="300">
  145.         <Category>Custom</Category>
  146.         <WriteAction ID="MomUIGenaratedModule0c16fda31365426e82f744cab8f7db6c" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
  147.           <ScriptName>RedmondDPRecovery.vbs</ScriptName>
  148.           <Arguments />
  149.           <ScriptBody>Set wshShell = WScript.CreateObject ("")
  150. "c:\windows\system32\notepad.exe", 6, True
  151. set wshshell = nothing</ScriptBody>
  152.           <TimeoutSeconds>300</TimeoutSeconds>
  153.         </WriteAction>
  154.       </Recovery>
  155.     </Recoveries>
  156.   </Monitoring>
  157.   <Presentation>
  158.     <Views>
  159.       <View ID="DynamicProvisionDP.StateView" Accessibility="Internal" Enabled="true" Target="DynamicProvisionDP.RedmondDP" TypeID="SystemCenter!Microsoft.SystemCenter.StateViewType" Visible="true">
  160.         <Category>StateCollection</Category>
  161.         <Criteria />
  162.       </View>
  163.       <View ID="View_04fa006bc6f54c7d84616c6e8af3ad32" Accessibility="Public" Enabled="true" Target="DynamicProvisionDP.RedmondDP" TypeID="SystemCenter!Microsoft.SystemCenter.StateViewType" Visible="true">
  164.         <Category>Operations</Category>
  165.         <Criteria>
  166.           <InMaintenanceMode>false</InMaintenanceMode>
  167.         </Criteria>
  168.         <Presentation>
  169.           <ColumnInfo Index="0" SortIndex="0" Width="100" Grouped="false" Sorted="true" IsSortable="true" Visible="true" SortOrder="Descending">
  170.             <Name>State</Name>
  171.             <Id>DynamicProvisionDP.RedmondDP</Id>
  172.           </ColumnInfo>
  173.           <ColumnInfo Index="1" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
  174.             <Name>Maintenance Mode</Name>
  175.             <Id>InMaintenanceMode</Id>
  176.           </ColumnInfo>
  177.           <ColumnInfo Index="2" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
  178.             <Name>Name</Name>
  179.             <Id>Name</Id>
  180.           </ColumnInfo>
  181.           <ColumnInfo Index="3" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
  182.             <Name>Path</Name>
  183.             <Id>Path</Id>
  184.           </ColumnInfo>
  185.           <ColumnInfo Index="4" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  186.             <Name>Operating System Version</Name>
  187.             <Id>OSVersion</Id>
  188.           </ColumnInfo>
  189.           <ColumnInfo Index="5" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  190.             <Name>Operating System Version Display Name</Name>
  191.             <Id>OSVersionDisplayName</Id>
  192.           </ColumnInfo>
  193.           <ColumnInfo Index="6" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  194.             <Name>Product Type</Name>
  195.             <Id>ProductType</Id>
  196.           </ColumnInfo>
  197.           <ColumnInfo Index="7" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  198.             <Name>Build Number</Name>
  199.             <Id>BuildNumber</Id>
  200.           </ColumnInfo>
  201.           <ColumnInfo Index="8" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  202.             <Name>CSD Version</Name>
  203.             <Id>CSDVersion</Id>
  204.           </ColumnInfo>
  205.           <ColumnInfo Index="9" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  206.             <Name>Service Pack Version</Name>
  207.             <Id>ServicePackVersion</Id>
  208.           </ColumnInfo>
  209.           <ColumnInfo Index="10" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  210.             <Name>Serial Number</Name>
  211.             <Id>SerialNumber</Id>
  212.           </ColumnInfo>
  213.           <ColumnInfo Index="11" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  214.             <Name>Install Date</Name>
  215.             <Id>InstallDate</Id>
  216.           </ColumnInfo>
  217.           <ColumnInfo Index="12" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  218.             <Name>System Drive</Name>
  219.             <Id>SystemDrive</Id>
  220.           </ColumnInfo>
  221.           <ColumnInfo Index="13" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  222.             <Name>Windows Directory</Name>
  223.             <Id>WindowsDirectory</Id>
  224.           </ColumnInfo>
  225.           <ColumnInfo Index="14" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  226.             <Name>Physical Memory (KB)</Name>
  227.             <Id>PhysicalMemory</Id>
  228.           </ColumnInfo>
  229.           <ColumnInfo Index="15" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  230.             <Name>Logical Processors</Name>
  231.             <Id>LogicalProcessors</Id>
  232.           </ColumnInfo>
  233.           <ColumnInfo Index="16" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
  234.             <Name>Display Name</Name>
  235.             <Id>DisplayName</Id>
  236.           </ColumnInfo>
  237.         </Presentation>
  238.         <Target />
  239.       </View>
  240.       <View ID="View_46f83bae82cd49bf96314437efec81ad" Accessibility="Public" Enabled="true" Target="DynamicProvisionDP.RedmondDP" TypeID="SystemCenter!Microsoft.SystemCenter.PerformanceViewType" Visible="true">
  241.         <Category>Operations</Category>
  242.         <Criteria>
  243.           <RuleList>
  244.             <Rule>64c1b2b1-be82-31ef-eb27-61e3645f6aee</Rule>
  245.           </RuleList>
  246.         </Criteria>
  247.         <Presentation>
  248.           <SortedColumnIndex>0</SortedColumnIndex>
  249.           <SortOrder>0</SortOrder>
  250.           <StartTime>2009-06-15T19:38:17.561611-07:00</StartTime>
  251.           <EndTime>2009-06-16T19:38:17.561611-07:00</EndTime>
  252.           <DynamicTimeTicks>864000000000</DynamicTimeTicks>
  253.           <IsDynamic>true</IsDynamic>
  254.           <Is3DMode>false</Is3DMode>
  255.           <ShowAlerts>false</ShowAlerts>
  256.           <ShowMaintenanceMode>false</ShowMaintenanceMode>
  257.           <BaselineMode>false</BaselineMode>
  258.           <ShowPointLabels>false</ShowPointLabels>
  259.           <EnableSmartLabels>true</EnableSmartLabels>
  260.           <RightAngleAxes>false</RightAngleAxes>
  261.           <ClusterSeries>false</ClusterSeries>
  262.           <Title />
  263.           <TitleFont>Microsoft Sans Serif,12,Regular</TitleFont>
  264.           <ChartFont>Microsoft Sans Serif,8.25,Regular</ChartFont>
  265.           <ShowBands>false</ShowBands>
  266.           <BandColor>-1579033</BandColor>
  267.           <ChartType>Line</ChartType>
  268.           <Depth>100</Depth>
  269.           <GapDepth>100</GapDepth>
  270.           <Perspective>10</Perspective>
  271.           <GraphXRotation>0</GraphXRotation>
  272.           <GraphYRotation>0</GraphYRotation>
  273.           <XLabelAngle>0</XLabelAngle>
  274.           <LabelColor>-16777216</LabelColor>
  275.           <LabelFont>Microsoft Sans Serif,8.25,Regular</LabelFont>
  276.           <XAxisVisible>True</XAxisVisible>
  277.           <XShowMajorGridlines>false</XShowMajorGridlines>
  278.           <XShowMinorGridlines>false</XShowMinorGridlines>
  279.           <ShowInterlaceStrips>false</ShowInterlaceStrips>
  280.           <XInterlaceColor>16777215</XInterlaceColor>
  281.           <XShowSideMargin>true</XShowSideMargin>
  282.           <XAxisFont>Microsoft Sans Serif,8.25,Regular</XAxisFont>
  283.           <AutoAxis>true</AutoAxis>
  284.           <AxisMax>100</AxisMax>
  285.           <AxisMin>0</AxisMin>
  286.           <YAxisVisible>True</YAxisVisible>
  287.           <YShowMajorGridlines>true</YShowMajorGridlines>
  288.           <YShowMinorGridlines>false</YShowMinorGridlines>
  289.           <YShowInterlaceStrips>false</YShowInterlaceStrips>
  290.           <YShowSideMargin>true</YShowSideMargin>
  291.           <YAxisFont>Microsoft Sans Serif,8.25,Regular</YAxisFont>
  292.           <BackgroundColor1>-1</BackgroundColor1>
  293.           <BackgroundColor2>-1</BackgroundColor2>
  294.           <GradientType>None</GradientType>
  295.           <Series />
  296.         </Presentation>
  297.         <Target />
  298.       </View>
  299.     </Views>
  300.     <Folders>
  301.       <Folder ID="Folder_04a15710e108455fac112f27934b76ed" Accessibility="Public" ParentFolder="SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" />
  302.     </Folders>
  303.     <FolderItems>
  304.       <FolderItem ElementID="DynamicProvisionDP.StateView" Folder="SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" />
  305.       <FolderItem ElementID="View_04fa006bc6f54c7d84616c6e8af3ad32" Folder="Folder_04a15710e108455fac112f27934b76ed" />
  306.       <FolderItem ElementID="View_46f83bae82cd49bf96314437efec81ad" Folder="Folder_04a15710e108455fac112f27934b76ed" />
  307.     </FolderItems>
  308.     <StringResources>
  309.       <StringResource ID="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor_AlertMessageResourceID" />
  310.     </StringResources>
  311.   </Presentation>
  312.   <LanguagePacks>
  313.     <LanguagePack ID="ENU" IsDefault="false">
  314.       <DisplayStrings>
  315.         <DisplayString ElementID="DynamicProvisionDP">
  316.           <Name>DynamicProvisionDP</Name>
  317.           <Description>This management pack will detect "high" usage of DPs and take action</Description>
  318.         </DisplayString>
  319.         <DisplayString ElementID="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor">
  320.           <Name>DP Connections Monitor</Name>
  321.         </DisplayString>
  322.         <DisplayString ElementID="DynamicProvisionDP.DynamicProvisionDP.DP_ConcurrentConnections">
  323.           <Name>DP Connections</Name>
  324.         </DisplayString>
  325.         <DisplayString ElementID="DynamicProvisionDP.RedmondDP">
  326.           <Name>RedmondDP</Name>
  327.         </DisplayString>
  328.         <DisplayString ElementID="DynamicProvisionDP.RedmondDP_Discovery">
  329.           <Name>DynamicProvisionDP.RedmondDP_Discovery</Name>
  330.         </DisplayString>
  331.         <DisplayString ElementID="Folder_04a15710e108455fac112f27934b76ed">
  332.           <Name>DynamicProvisionDP</Name>
  333.         </DisplayString>
  334.         <DisplayString ElementID="DynamicProvisionDP.StateView">
  335.           <Name>DP State</Name>
  336.         </DisplayString>
  337.         <DisplayString ElementID="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor_AlertMessageResourceID">
  338.           <Name>DP Connections Monitor</Name>
  339.           <Description>Instance {0}
  340.             Object {1}
  341.             Counter {2}
  342.             Has a value {3}
  343.             At time {4}</Description>
  344.         </DisplayString>
  345.         <DisplayString ElementID="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor" SubElementID="OverThreshold">
  346.           <Name>OverThreshold</Name>
  347.         </DisplayString>
  348.         <DisplayString ElementID="DynamicProvisionDP.DP_ConcurrentConnectionsMonitor" SubElementID="UnderThreshold">
  349.           <Name>UnderThreshold</Name>
  350.         </DisplayString>
  351.         <DisplayString ElementID="View_04fa006bc6f54c7d84616c6e8af3ad32">
  352.           <Name>DP State</Name>
  353.         </DisplayString>
  354.         <DisplayString ElementID="View_46f83bae82cd49bf96314437efec81ad">
  355.           <Name>DP Performance</Name>
  356.         </DisplayString>
  357.         <DisplayString ElementID="MomUIGenaratedRecovery65313795f8d6405ba9e9da455b77898e">
  358.           <Name>RedmondDPRecovery</Name>
  359.         </DisplayString>
  360.       </DisplayStrings>
  361.     </LanguagePack>
  362.   </LanguagePacks>
  363. </ManagementPack>

Configuring Recovery Tasks for SCOM’s Root Management Server

The “typical’ design of a management pack is to take “recovery” actions against the target server whose state is critical.  For example, if your Web server is sitting at 100% CPU you would take a recovery action against that server such as recycle the application pool.  The target in this case is the server who through the alert.

However, in the case of scaling your infrastructure, the target completely changes as you are interested in using the “state” of a machine and asking it to do nothing.  For example, I want my Web server who is sitting at 100% CPU to do nothing other than go unhealthy so I can take action.  This is a bit trickier overall.

In this case, you would use SCOM’s Channel, Subscriptions, and Notifications to setup the alert to take action through a command action.  This also could be email, text message, or IM you when the problem occurs.  The extreme action is to spin up additional servers to help support the load that is currently in place.

How do I do this?  Glad you asked…

Create Channel

The following step will create our appropriate recovery action to initiate the recovery steps when our target servers get in a state which we don’t desire such as Critical.  To do this, do the following:

NOTE:  To perform these actions, you will need the appropriate SCOM privileges setup

  1. Open the SCOM Administrators Console
  2. Click the Administration Tab
  3. Click Channels under Notificationsimage
  4. Under New, select Commandimage
  5. In the Command Notification wizard, input the Channel Name & Descriptionimage
  6. Click Next
  7. For the Notification Channel, input the command to execute (e.g. dp_recovery.cmd), select Alert Source (this isn’t used in our scenario),  and the startup folder (the command-line parameters are optional)image
  8. Click Finish

This will successfully create the channel for us that initiates the command-line action.  It uses a local path because if you remember that we know the SCOM server will take all the actions so we can safely assume that the directory is highly available.

Add Subscriber

The purpose of the Subscriber is to bind the “who” to the what which is the channel.  So we need to add a active subscriber to our infrastructure. In our case, the subscriber is the SCVMM server for our infrastructure.

To setup a subscriber, do the following:

  1. Open the SCOM Administrators Console
  2. Click the Administrators tab
  3. Click Subscriber under Notification
  4. Right click, select New to open the New Subscriber Wizard
  5. Input the Subscriber nameimage
  6. Select to always send notifications (this is a nice thing to have where you could scope it to a schedule if you needed too)image
  7. Click the Add on the Notification Subscriber Wizard which starts an additional wizardimage
  8. In the Describe the Subscriber Address, input the address name such as SCVMMimage 
  9. Let’s then provide the Channel & Delivery Address to use (delivery address isn’t really used)image
  10. Click the Command Channel drop down and select DP Recovery (or whatever you named it)image
  11. For the Delivery address, input addressimage
  12. Click Next
  13. Select Always Send Notifications for scheduling
  14. Click Finish

The completed setup for this section should result in something similar to the following:


Create Subscription

The next, and last, step is to create a subscription.  In this section I will walk you through creating your subscription so that you have completed the process of creating the channel, subscriber, and subscription.  The following are the steps to create the subscription:

  1. Open the SCOM Administrator’s Console
  2. Click the Administration Tab
  3. Click the Subscriptions under Notifications
  4. Right-click and select New to open the Notification Subscription Wizard
  5. Enter a subscription name such a Redmond DP and a Descriptionimage
  6. In the criteria selection, select the following:image
  7. Click Next
  8. To search, you would select the following based on the name of your MP:image
  9. In the subscriber search, select the available subscribers created above:image
  10. Highlight and click Add
  11. Click Add on the Channels wizard, and then click Searchimage
  12. Click Finish

That’s it.  You now have your SCOM wired up to monitor your DP, and based on criteria you created, take an action that would include the opportunity to build you a new DP.

NOTE:  Your SCOM server’s service account is used for the creation of your virtual machine.  In order for this to work, you will need to add your SCOM service account to the administrator’s role in SCVMM.  You can also add additional accounts for notification if you prefer to specify a different account is used.


What we focused on today and how we tied together the two pieces of our infrastructure – SCVMM & SCOM and focused heavily on how to correctly set these up so that you can “scale” on demand.  The key piece of this puzzle is the management pack which we have built along with several other posts I have made that make up the building blocks of this entire principle - “scale on demand” – not after it is too late.  For us, we focused on how to build a “typical” SCOM infrastructure, including installing agents, and how to effectively get the management packs imported so you can effectively use your custom management pack since we are dependent on them.

I will start soon pulling this all together so that you can see what “dynamic provisioning” using System Center is all about!



Digg This
Skip to main content