Process monitoring during business hours– attempt #2


Eventually I managed to find the time to write a follow up to my first installment: Process monitoring during business hours – attempt #1.

I apologize for the time it took, but writing code without documentation takes time and regarding templates we have no documentation and very few samples..

I would define this post as DRAFT, since I’m not satisfied from the level of automation I got, based on community feedback I could decide to develop it further.

With this version you have:

  1. same level of monitoring of the standard process monitoring library
  2. all the monitoring stuff is subject to a business hours filter
  3. all the collection rules are not subject to the business hours filter
  4. you can override the frequency of the monitors, but not the business hours filter (to change it you must edit the template instance created by the wizard – it doesn’t work see known issue)
  5. all the rules store data in the data warehouse and not only in the live database

Known Issues

The newly created template instance is not modifiable, I couldn’t understand why but the UI breaks in exception

image

basically it doesn’t load the configuration sections from the Management Pack. At the moment I have no solution, if you go wrong creating your new process monitor you have to delete and recreate it. If anyone is able to find a solution I’m here to listen. Smile

How to modify the standard process monitoring template

The product team has given me green light to share the modified MP so you don’t have to step through this mess (thanks Justin): QND.ProcessMonitoring.Library.mp

So right now I won’t share how to modify the standard process monitoring management pack to achieve the goal of monitoring processes only during business hours. Here are the macro steps:

  1. Export in plain XML the Microsoft.SystemCenter.ProcessMonitoring.Library.mp
  2. Define your own namespace, in my sample I will use QND.ProcessMonitoring
  3. Edit the monitor types to introduce the business hours filter
  4. Edit the template accordingly
  5. Add the scheduler filter UI page to the wizard and the proper xsl transformations
  6. Finally add some display strings

1. to export the MP in XML format you can check here.

2. Once you have the xml, with your favorite text editor replace Microsoft. SystemCenter.ProcessMonitoring with your new namespace (i.e. QND.ProcessMonitoring), then add to the references section the following:

      <Reference Alias="ProcessLib">

        <ID>Microsoft.SystemCenter.ProcessMonitoring.Library</ID>

        <Version>6.1.7043.0</Version>

        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

      </Reference>

      <Reference Alias="SCDW">

        <ID>Microsoft.SystemCenter.DataWarehouse.Library</ID>

        <Version>6.1.7043.0</Version>

        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

      </Reference

3. Goto to the MonitorTypes Section and for each UnitMonitorType do the following:

in the configuration section

        <Configuration>

          <IncludeSchemaTypes>

            <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>

          </IncludeSchemaTypes>

 

<< original configuration items >>

          <xsd:element name="SchedulerFilter" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

            <xsd:complexType>

              <xsd:sequence>

                <xsd:element name="ProcessDataMode">

                  <xsd:simpleType>

                    <xsd:restriction base="xsd:string">

                      <xsd:enumeration value="Always" />

                      <xsd:enumeration value="OnSchedule" />

                      <xsd:enumeration value="ExceptSchedule" />

                    </xsd:restriction>

                  </xsd:simpleType>

                </xsd:element>

                <xsd:element name="Schedule" type="PublicSchedulerType" minOccurs="0" maxOccurs="1" />

                <xsd:choice minOccurs="0" maxOccurs="1">

                  <xsd:element name="TimeXPathQuery" type="xsd:string" />

                  <xsd:element name="UseCurrentTime" type="xsd:boolean" default="false" />

                </xsd:choice>

              </xsd:sequence>

            </xsd:complexType>

          </xsd:element>

        </Configuration>

In the member modules section add

            <ConditionDetection ID="BHFilter" TypeID="System!System.SchedulerFilter">

              <SchedulerFilter>$Config/SchedulerFilter$</SchedulerFilter>

            </ConditionDetection>

Add the BHFilter Node just after the datasource in every regular detection just like the following
            <RegularDetection MonitorTypeStateID="OutsideRangeState">

              <Node ID="Cond">

                <Node ID="OutsideRangeCorrelated">

                  <Node ID="BHFilter">

                    <Node ID="DataSource" />

                  </Node>

                </Node>

                <Node ID="InsideRangeCorrelated">

                  <Node ID="BHFilter">

                    <Node ID="DataSource" />

                  </Node>

                </Node>

              </Node>

            </RegularDetection>

            <RegularDetection MonitorTypeStateID="InsideRangeState">

              <Node ID="InsideRange">

                <Node ID="BHFilter">

                  <Node ID="DataSource" />

                </Node>

              </Node>

            </RegularDetection>

In the end your UnitMonitorType should like the following (remember to do this for each UnitMonitorType)
      <UnitMonitorType ID="QND.ProcessMonitoring.ProcessInstanceCountMonitorType" Accessibility="Public">

        <MonitorTypeStates>

          <MonitorTypeState ID="OutsideRangeState" NoDetection="false" />

          <MonitorTypeState ID="InsideRangeState" NoDetection="false" />

        </MonitorTypeStates>

        <Configuration>

          <IncludeSchemaTypes>

            <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>

          </IncludeSchemaTypes>

          <xsd:element name="ProcessName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

          <xsd:element name="Frequency" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

          <xsd:element name="MinInstanceCount" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

          <xsd:element name="MaxInstanceCount" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

          <xsd:element name="InstanceCountOutOfRangeTimeThresholdInSeconds" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

          <xsd:element name="SchedulerFilter" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

            <xsd:complexType>

              <xsd:sequence>

                <xsd:element name="ProcessDataMode">

                  <xsd:simpleType>

                    <xsd:restriction base="xsd:string">

                      <xsd:enumeration value="Always" />

                      <xsd:enumeration value="OnSchedule" />

                      <xsd:enumeration value="ExceptSchedule" />

                    </xsd:restriction>

                  </xsd:simpleType>

                </xsd:element>

                <xsd:element name="Schedule" type="PublicSchedulerType" minOccurs="0" maxOccurs="1" />

                <xsd:choice minOccurs="0" maxOccurs="1">

                  <xsd:element name="TimeXPathQuery" type="xsd:string" />

                  <xsd:element name="UseCurrentTime" type="xsd:boolean" default="false" />

                </xsd:choice>

              </xsd:sequence>

            </xsd:complexType>

          </xsd:element>

        </Configuration>

        <OverrideableParameters>

          <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />

        </OverrideableParameters>

        <MonitorImplementation>

          <MemberModules>

             <DataSource ID="DataSource" TypeID="System!System.ProcessInformationProvider">

              <Frequency>$Config/Frequency$</Frequency>

            </DataSource>

            <ConditionDetection ID="BHFilter" TypeID="System!System.SchedulerFilter">

              <SchedulerFilter>$Config/SchedulerFilter$</SchedulerFilter>

            </ConditionDetection>

            <ConditionDetection ID="InsideRange" TypeID="System!System.ExpressionFilter">

              <Expression>

                <Or>

                  <Expression>

                    <And>

                      <Expression>

                        <Exists>

                          <ValueExpression>

                            <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                          </ValueExpression>

                        </Exists>

                      </Expression>

                      <Expression>

                        <And>

                          <Expression>

                            <SimpleExpression>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                              <Operator>GreaterEqual</Operator>

                              <ValueExpression>

                                <Value Type="UnsignedInteger">$Config/MinInstanceCount$</Value>

                              </ValueExpression>

                            </SimpleExpression>

                          </Expression>

                          <Expression>

                            <SimpleExpression>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                              <Operator>LessEqual</Operator>

                              <ValueExpression>

                                <Value Type="UnsignedInteger">$Config/MaxInstanceCount$</Value>

                              </ValueExpression>

                            </SimpleExpression>

                          </Expression>

                        </And>

                      </Expression>

                    </And>

                  </Expression>

                  <Expression>

                    <And>

                      <Expression>

                        <Not>

                          <Expression>

                            <Exists>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                            </Exists>

                          </Expression>

                        </Not>

                      </Expression>

                      <Expression>

                        <SimpleExpression>

                          <ValueExpression>

                            <Value Type="UnsignedInteger">0</Value>

                          </ValueExpression>

                          <Operator>Equal</Operator>

                          <ValueExpression>

                            <Value Type="UnsignedInteger">$Config/MinInstanceCount$</Value>

                          </ValueExpression>

                        </SimpleExpression>

                      </Expression>

                    </And>

                  </Expression>

                </Or>

              </Expression>

            </ConditionDetection>

            <ConditionDetection ID="InsideRangeCorrelated" TypeID="System!System.ExpressionFilter">

              <Expression>

                <Or>

                  <Expression>

                    <And>

                      <Expression>

                        <Exists>

                          <ValueExpression>

                            <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                          </ValueExpression>

                        </Exists>

                      </Expression>

                      <Expression>

                        <And>

                          <Expression>

                            <SimpleExpression>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                              <Operator>GreaterEqual</Operator>

                              <ValueExpression>

                                <Value Type="UnsignedInteger">$Config/MinInstanceCount$</Value>

                              </ValueExpression>

                            </SimpleExpression>

                          </Expression>

                          <Expression>

                            <SimpleExpression>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                              <Operator>LessEqual</Operator>

                              <ValueExpression>

                                <Value Type="UnsignedInteger">$Config/MaxInstanceCount$</Value>

                              </ValueExpression>

                            </SimpleExpression>

                          </Expression>

                        </And>

                      </Expression>

                    </And>

                  </Expression>

                  <Expression>

                    <And>

                      <Expression>

                        <Not>

                          <Expression>

                            <Exists>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                            </Exists>

                          </Expression>

                        </Not>

                      </Expression>

                      <Expression>

                        <SimpleExpression>

                          <ValueExpression>

                            <Value Type="UnsignedInteger">0</Value>

                          </ValueExpression>

                          <Operator>Equal</Operator>

                          <ValueExpression>

                            <Value Type="UnsignedInteger">$Config/MinInstanceCount$</Value>

                          </ValueExpression>

                        </SimpleExpression>

                      </Expression>

                    </And>

                  </Expression>

                </Or>

              </Expression>

            </ConditionDetection>

            <ConditionDetection ID="OutsideRangeCorrelated" TypeID="System!System.ExpressionFilter">

              <Expression>

                <Not>

                  <Expression>

                    <Or>

                      <Expression>

                        <And>

                          <Expression>

                            <Exists>

                              <ValueExpression>

                                <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                              </ValueExpression>

                            </Exists>

                          </Expression>

                          <Expression>

                            <And>

                              <Expression>

                                <SimpleExpression>

                                  <ValueExpression>

                                    <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                                  </ValueExpression>

                                  <Operator>GreaterEqual</Operator>

                                  <ValueExpression>

                                    <Value Type="UnsignedInteger">$Config/MinInstanceCount$</Value>

                                  </ValueExpression>

                                </SimpleExpression>

                              </Expression>

                              <Expression>

                                <SimpleExpression>

                                  <ValueExpression>

                                    <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                                  </ValueExpression>

                                  <Operator>LessEqual</Operator>

                                  <ValueExpression>

                                    <Value Type="UnsignedInteger">$Config/MaxInstanceCount$</Value>

                                  </ValueExpression>

                                </SimpleExpression>

                              </Expression>

                            </And>

                          </Expression>

                        </And>

                      </Expression>

                      <Expression>

                        <And>

                          <Expression>

                            <Not>

                              <Expression>

                                <Exists>

                                  <ValueExpression>

                                    <XPathQuery Type="UnsignedInteger">ProcessInformations/ProcessInformation[./ProcessName ='$Config/ProcessName$']/ActiveInstanceCount</XPathQuery>

                                  </ValueExpression>

                                </Exists>

                              </Expression>

                            </Not>

                          </Expression>

                          <Expression>

                            <SimpleExpression>

                              <ValueExpression>

                                <Value Type="UnsignedInteger">0</Value>

                              </ValueExpression>

                              <Operator>Equal</Operator>

                              <ValueExpression>

                                <Value Type="UnsignedInteger">$Config/MinInstanceCount$</Value>

                              </ValueExpression>

                            </SimpleExpression>

                          </Expression>

                        </And>

                      </Expression>

                    </Or>

                  </Expression>

                </Not>

              </Expression>

            </ConditionDetection>

            <ConditionDetection ID="Cond" TypeID="System!System.CorrelatorAutoMissingCondition">

              <Correlator>

                <CorrelationExpression />

                <Count>1</Count>

                <Interval>$Config/InstanceCountOutOfRangeTimeThresholdInSeconds$</Interval>

                <CorrelationOrder>InSequence</CorrelationOrder>

                <CorrelationItemPolicy>Last</CorrelationItemPolicy>

              </Correlator>

            </ConditionDetection>

          </MemberModules>

          <RegularDetections>

            <RegularDetection MonitorTypeStateID="OutsideRangeState">

              <Node ID="Cond">

                <Node ID="OutsideRangeCorrelated">

                  <Node ID="BHFilter">

                    <Node ID="DataSource" />

                  </Node>

                </Node>

                <Node ID="InsideRangeCorrelated">

                  <Node ID="BHFilter">

                    <Node ID="DataSource" />

                  </Node>

                </Node>

              </Node>

            </RegularDetection>

            <RegularDetection MonitorTypeStateID="InsideRangeState">

              <Node ID="InsideRange">

                <Node ID="BHFilter">

                  <Node ID="DataSource" />

                </Node>

              </Node>

            </RegularDetection>

          </RegularDetections>

        </MonitorImplementation>

      </UnitMonitorType>

Now step the template section. first check the template name it should become like this

    <Template ID="QND.ProcessMonitor.Template">

 

then add the following to the configuration section

        <IncludeSchemaTypes>

          <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>

        </IncludeSchemaTypes>

and then at the end of the same section

        <xsd:element name="SchedulerFilter" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

          <xsd:complexType>

            <xsd:sequence>

              <xsd:element name="ProcessDataMode">

                <xsd:simpleType>

                  <xsd:restriction base="xsd:string">

                    <xsd:enumeration value="Always" />

                    <xsd:enumeration value="OnSchedule" />

                    <xsd:enumeration value="ExceptSchedule" />

                  </xsd:restriction>

                </xsd:simpleType>

              </xsd:element>

              <xsd:element name="Schedule" type="PublicSchedulerType" minOccurs="0" maxOccurs="1" />

              <xsd:choice minOccurs="0" maxOccurs="1">

                <xsd:element name="TimeXPathQuery" type="xsd:string" />

                <xsd:element name="UseCurrentTime" type="xsd:boolean" default="false" />

              </xsd:choice>

            </xsd:sequence>

          </xsd:complexType>

        </xsd:element>

 

now in the reference section of the template add 2 new rows

        <Reference ID="ProcessLib" />

        <Reference ID="SCDW" />

if you want your performance data persisted in the data warehouse you must add the following line in the WriteActions section of each rule in the template

                <WriteAction ID="WriteToDW" TypeID="$Reference/SCDW$Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />  

Then in the Monitors section of the template for each UnitMonitor at the end of the Configuration section just add the filter

                <SchedulerFilter>$TemplateConfig/SchedulerFilter$</SchedulerFilter>

 

A sample monitor should look like the following now:

            <UnitMonitor ID="$TemplateConfig/MonitoredProcessTypeId$.ProcessRunningTimeMonitor" Accessibility="Public" 
Enabled="$TemplateConfig/IsMonitorProcessRunningTimeOptionSelected$" Target="$TemplateConfig/MonitoredProcessTypeId$MonitoredProcess" 
ParentMonitorID="$Reference/Health$System.Health.AvailabilityState" Remotable="false" Priority="Normal" 
TypeID="$Reference/Self$QND.ProcessMonitoring.SimpleThreshold.ErrorOnTooHigh" ConfirmDelivery="false">

              <Category>AvailabilityHealth</Category>

              <AlertSettings AlertMessage="$TemplateConfig/MonitoredProcessTypeId$.ProcessMonitoring.RunningTimeThresholdExceeded.AlertMessage">

                <AlertOnState>Error</AlertOnState>

                <AutoResolve>false</AutoResolve>

                <AlertPriority>Normal</AlertPriority>

                <AlertSeverity>Error</AlertSeverity>

                <AlertParameters>

                  <AlertParameter1>$Data/Context/Value$</AlertParameter1>

                </AlertParameters>

              </AlertSettings>

              <OperationalStates>

                <OperationalState ID="OK" MonitorTypeStateID="UnderThreshold" HealthState="Success" />

                <OperationalState ID="Error" MonitorTypeStateID="OverThreshold" HealthState="Error" />

              </OperationalStates>

              <Configuration>

                <ComputerName>$Target/Host/Property[Type="$Reference/Windows$Microsoft.Windows.Computer"]/NetworkName$</ComputerName>

                <CounterName>Elapsed Time</CounterName>

                <ObjectName>Process</ObjectName>

                <InstanceName>$Target/Property[Type="$Reference/ProcessLib$Microsoft.SystemCenter.Process.BaseMonitoredProcess"]/ProcessName$*</InstanceName>

                <Frequency>300</Frequency>

                <Threshold>$TemplateConfig/Threshold$</Threshold>

                <SchedulerFilter>$TemplateConfig/SchedulerFilter$</SchedulerFilter>

              </Configuration>

            </UnitMonitor>

with this you’re basically done for the template stuff.  It’s time to add the UI.

In the PresentationTypes section delete the UIPages section, we don’t need this we will just reference the standard management pack ones. The UIPageSet tag must look like the following:

<UIPageSet ID="QND.ProcessMonitor.TemplatePageSet" TypeDefinitionID="QND.ProcessMonitor.Template">

remember to change all the references to

Microsoft.SystemCenter.ProcessMonitor.Template.* to ProcessLib!Microsoft.SystemCenter.ProcessMonitor.Template.*

a sample page reference should look like:

<UIPageReference ID="QND.ProcessMonitor.TemplatePageSet.Reference.TargetGroupAndProcessPage" 
     PageID="ProcessLib!Microsoft.SystemCenter.ProcessMonitor.Template.TargetGroupAndProcessPage" Usage="CreationAndUpdate">

After the TargetGroupAndProcessPage add the Scheduler filter page

          <UIPageReference ID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage" PageID="System!System.SchedulerFilterPage" Usage="CreationAndUpdate">

            <InputTransform>

              <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

                <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />

                <xsl:template match="//SchedulerFilter">

                  <xsl:element name="ProcessDataMode">

                  <xsl:copy-of select="/ProcessDataMode" />

                  </xsl:element>

                  <xsl:element name="Schedule">

                    <xsl:copy-of select="/Schedule" />

                  </xsl:element>

                  <xsl:element name="UseCurrentTime">true</xsl:element>

                </xsl:template>

              </xsl:stylesheet>

            </InputTransform>

            <Title ID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage.Title" />

            <SubTitle ID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage.SubTitle" />

            <TabName ID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage.TabName" />

          </UIPageReference>

 

Finally in the output transform section add

                <xsl:element name="SchedulerFilter">

                  <xsl:copy-of select="/SchedulerFilter/*" />

                </xsl:element>

OK we’re done, if you want to you can add the following display strings

        <DisplayString ElementID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage" SubElementID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage.Title">

          <Name>Business Hours Filter</Name>

        </DisplayString>

        <DisplayString ElementID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage" SubElementID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage.TabName">

          <Name>Business Hours</Name>

        </DisplayString>

        <DisplayString ElementID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage" SubElementID="QND.ProcessMonitor.TemplatePageSet.Reference.SchedulerFilterPage.SubTitle">

          <Name>Business Hours Filter</Name>

        </DisplayString>

 

You won’t believe it, but that’s all. I know it’s not easy to replay all these steps, I hope to get a green light to share the whole management pack.

That’s all folks.

- Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

Appendixes

Where to find xsl examples

You can look in specific management pack, but the fastest way is to look in the following tables in the live database: UIPageSet and UIPageReference.

How to get the xml document without samples

Open the Microsoft.EnterpriseManagement.UI.Authoring.dll with Reflector

image

Find the page, it must be derived from UIPage

image

Go to method SavePageConfig() and check the type of the variable used in the Serialize method (in this case the variable name is "filter" and the type is "SchedulerFilter")

image

image

If the second parameter of the Serialize method is false then the xml document will have a root element, this is typically the type/class name

check the type definition and you’re done, you have the xml tag to search for

image

If the document has a root element the selection is really simple, you can use something like /<typename>/* as in

                <xsl:element name="SchedulerFilter">

                  <xsl:copy-of select="/SchedulerFilter/*" />

                </xsl:element>

About these ads
  1. #1 by dorlm on October 30, 2012 - 2:06 pm

    Hi, thanks for the MP ))

    We did install the MP for attempt number two on Scom 2012 and we have the template in Scom and we try to create new process monitor.
    as we add new process monitor we have an error on the finishing step.
    the error is about processing template failed.
    the configuration specified for module DiscoveryDS is not valid cannot find managementpackelement … microsoft.windows.computer

    what can we do ?
    Thanks a lot

    • #2 by Daniele Grandini on October 30, 2012 - 2:59 pm

      Hi unfortunately this MP hasn’t been tested on 2012, I used undocumented and thus unsupported clauses in the MP. It needs to be tested on 2012, I can do it, but I don’t have a date yet.

      • #3 by dorlm on November 1, 2012 - 9:01 am

        OK
        let us know if you tested it.
        Thanks

  2. #4 by dorlm on October 30, 2012 - 10:05 am

    Where can i find the QND.ProcessMonitoring.Library.mp download?
    The link is not good.
    Thanks

  3. #6 by Pavel Dzemyantsau on April 19, 2011 - 3:44 pm

    regarding known issue and no possibility to edit template.
    Based on reflected code. Console does as follows:
    – gets template GUID
    – based on this GUID, gets template’s Config firing LoadConfigurationXml
    – fills in xml
    – transforms xml TemplateInputConfig for each UI page

    as your new template has unknown GUID, code does not fire ‘LoadConfigurationXml’, this leaves empty TemplateInputConfig, and then console can’t transform empty TemplateInputConfig to PagesConfig.

    See Microsoft.EnterpriseManagement.UI.Authoring.dll
    |__Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility
    |__MomExtensionsCommon->AddTemplatePages
    |_if ((this.templateToInputParserMap.TryGetValue(momTemplate.Id, out container)

    • #7 by Daniele Grandini on April 29, 2011 - 5:49 pm

      Hi Pavel,
      great input indeed. I will check how to define a guid for the template, I dind’t know it was needed.

      – Daniele

      • #8 by Pavel Dzemyantsau on April 30, 2011 - 5:44 pm

        I’m afraid there is no such possibility without recompiling MS code. But… please look into Exch2007 template, I did not find its GUID in the code I referred above and we know such template exists and works fine :)

        to find your GUID you may use
        T-SQL: SELECT * FROM [OperationsManager].[dbo].[Template] where Purpose is NULL
        or PS: Get-ManagementPack | %{$_.GetTemplates()} | where {$_.Purpose -eq $null} | select name,id

        a little bit about ‘Purpose’ is here http://msdn.microsoft.com/en-us/library/ee533878.aspx
        and my favorite quote from this page
        “The creation of custom management pack templates is not supported in the current release of Operations Manager.”

        I created for myself for reference the following mapping:

        1. ?Microsoft.SystemCenter.GenericGroup.Template
        • ID: 6DF4EE37-EB7A-F223-8C6F-1B6F3ECDC60B
        2. ?Microsoft.SystemCenter.InstanceGroup.Template
        • ID: F90DC3E4-7671-42D1-38E0-A3B82F294193
        3. Microsoft.SystemCenter.WebApplication.SingleUrl.Template
        • ID: 95A26C89-C470-33FD-C315-2A74A881552E
        4. Microsoft.SystemCenter.ASPNET20.2007.AspWebService.Template
        • ID: 0176E14D-0DAD-CEC0-8C42-45F681CBAD0B
        5. Microsoft.SystemCenter.ASPNET20.2007.AspApplication.Template
        • ID: 95425E1D-F453-BF68-E404-467CEE417D07
        6. Microsoft.Unix.LogFile.Template
        • ID: 3DE92454-65D0-249E-CCF0-4A9DC984C034
        7. Microsoft.Unix.Service.Template
        • ID: 22EC860F-D5CE-30D0-BC8A-B42D53DB9C62
        8. Microsoft.SystemCenter.SyntheticTransactions.OleDbCheck.Template
        • ID: 4D53017C-9F80-7A02-0FE8-70C0190606FA
        9. Microsoft.SystemCenter.NTService.OwnProcess.Template
        • ID: 6290E691-D8E6-E693-4618-8DE6BFDECD58
        10. Microsoft.SystemCenter.ProcessMonitor.Template
        • ID: B1FDEC96-B159-0237-A51C-929E425E2658
        11. Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheck.Template
        • ID: C29931CD-3739-C1A1-6E36-D16D1C648237
        12. Microsoft.Exchange2007.Template.CasTX
        • ID: 9B961D5B-FDA4-A047-8858-FAA612BBF12F
        • MP: Microsoft.Exchange.Server.2007.Template
        13. Microsoft.Exchange2007.Template.MailFlow
        • ID: 0F34DA79-23F5-407F-D534-216B9D3BD32F
        • MP: Microsoft.Exchange.Server.2007.Template
        14. Microsoft.SystemCenter.Azure.Template.HostedServiceDiscovery
        • ID: A026D01B-5026-A0F3-14D2-8BD5F8A44CDC
        15. ??? PowerDomainTemplateInputConfigHelper
        • ID: 1C5B4B52-583A-2467-F587-A4441E869BDB
        16. ??? PingMonitor,SCOM Essentials
        • ID: C905FB7D-580B-C6BF-C9C4-BCDF67D81859

      • #9 by Daniele Grandini on May 23, 2011 - 4:11 pm

        Hi Pavel,
        still there’s something missing. Let’s recap:
        1) yes, adding templates it is not supported for the general public, but a few chosen partners can indeed add they’re templates (SecureVantage, Avicode now MS, …)
        2) if 1) is true there must be a way to do things right, and it is not the way I did :-)
        3) If I get some spare time I will attach a debugger to the console and check what’s missing from the xml definition, as you can see from the stack the exception fires when the code tries to parse the xml tamplate with the page definition

        – Daniele

      • #10 by Pavel Dzemyantsau on June 8, 2011 - 10:14 am

        Ok. my recap :)
        XML schema:
        when SCOM engine parses MP it converts text ID to unique GUID value, if we have the same text then we will get the same GUID – this is true for all MP elements(folders,views,rules,etc. i.e. same text for ID generates the same GUID).
        inside MP – TemplateID= “bla-bla-bla”
        inside OpsDB – TemplateID=GUID
        All Microsoft TemplateIDs GUIDs are HARDCODED inside Microsoft.EnterpriseManagement.UI.Authoring.dll

        Now what SCOM console does when tries to process your template in EDIT mode.
        Console looks into HARDCODED list of well-known GUIDs
        code:
        See Microsoft.EnterpriseManagement.UI.Authoring.dll
        |__Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility
        |__MomExtensionsCommon->AddTemplatePages
        |_if ((this.templateToInputParserMap.TryGetValue(momTemplate.Id, out container)

        TryGetValue is hash table function, if this this clause is true (GUID found inside hardcoded list) we load config.xml otherwise we get your exception

        But as mentioned above, i did not find hardcode for Exchange2007 GUID.

        As for Avicode, i looked into ASP.NET template, its GUID is also harcoded inside Microsoft.EnterpriseManagement.UI.Authoring.dll
        and more, MS created stub inside code and does not allow us to edit ASP.NET template only create.

        Next steps: investigate how Microsoft.EnterpriseManagement.UI.Authoring.dll processes Exchange 2007 template in edit mode. This is our last chance.

  4. #11 by Daniele Muscetta on January 29, 2011 - 6:52 pm

    Sei un grande, come al solito!

  5. #12 by Menno on January 13, 2011 - 4:45 pm

    Very good article and exactly the solution I am looking for at the moment. However, I probably made a mistake somewhere …. :-(

    I know you are still busy with MS to get the MP published, but can you send it to me personally? We would like to start testing it in our TEST/DEV environment.

    Thanks.

  1. ziembor.pl | weekendowe czyszczenie kolejki: 2011-01-15

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 330 other followers

%d bloggers like this: