locked
Custom Management Pack development query... RRS feed

  • Question

  • Hi All

    I am picking up some internally developed SCOM Management Packs.  I am looking at how to reference existing objects within SCOM to be included \ added as part of the custom MP's Health Model.  Object(s) to be included are one or more JBoss application servers (deep monitored) that have been configured for monitoring via Microsoft's Java Management Pack.  Any pointers \ examples much appreciated.

    Kind REgards

    Andrew

    Tuesday, October 4, 2016 1:51 PM

Answers

  • Hi Andrew

    It is quite straight forward to do this in Visual Studio to make the Distributed Applications dynamic.

    You need to figure out the classes that you want to add to the Distributed Application and also which instances of those classes (so that you can use an expression filter). E.g. to include websites and SQL databases in a distributed application:

    1. Classes

          <!-- Distributed Application Classes - these groups (System.Groups) do not show up in the console under authoring, groups -->
            <ClassType ID="Fabrikam.Payments.DA" Base="System!System.Service" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
            <ClassType ID="Fabrikam.Payments.DA.ComponentGroup.ApplicationServers" Base="System!System.Group" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
            <ClassType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases" Base="System!System.Group" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
            <ClassType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsWebsites" Base="System!System.Group" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
    

    2. Relationships

     <TypeDefinitions>
        <EntityTypes>
          <RelationshipTypes>
    
            <!-- In this section, provide the Source (i.e. Parent) and Target (i.e. Child)
                 for this relationship. Also, review and update the Base attribute. 
                 More information can be found in the Management Pack Development Kit: 
                 http://msdn.microsoft.com/en-us/library/ee533533.aspx -->
            <RelationshipType ID="Fabrikam.Payments.DA.contains.Fabrikam.Payments.DA.ComponentGroup.ApplicationServers" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA"/>
              <Target ID="Target" Type="Fabrikam.Payments.DA.ComponentGroup.ApplicationServers"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.PaymentsDA.ComponentGroup.ApplicationServers.Contains.AppServers" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA.ComponentGroup.ApplicationServers"/>
              <Target ID="Target" Type="Fabrikam.Payments.AppServer"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.contains.Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA"/>
              <Target ID="Target" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases"/>
              <Target ID="Target" Type="MSL!Microsoft.SQLServer.Database"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.contains.Fabrikam.Payments.DA.ComponentGroup.Websites" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA"/>
              <Target ID="Target" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsWebsites"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsApplication.ContainsWebsites" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsWebsites"/>
              <Target ID="Target" Type="IIS2012!Microsoft.Windows.InternetInformationServices.6.2.WebSite"/>
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinitions>


    Example discovery to include a specific database in the DA:

         <Discovery ID="Fabrikam.Payments.Discover.Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases" Target="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases" Enabled="false" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="MSL!Microsoft.SQLServer.Database" />
              <DiscoveryRelationship TypeID="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
              <RuleId>$MPElement$</RuleId>
              <GroupInstanceId>$Target/Id$</GroupInstanceId>
              <MembershipRules>
                <MembershipRule>
                  <MonitoringClass>$MPElement[Name="MSL!Microsoft.SQLServer.Database"]$</MonitoringClass>
                  <RelationshipClass>$MPElement[Name="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases"]$</RelationshipClass>
                  <Expression>
                    <And>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <Property>$MPElement[Name="MSL!Microsoft.SQLServer.Database"]/DatabaseName$</Property>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>Payments</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <Property>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Property>
                          </ValueExpression>
                          <Operator>Like</Operator>
                          <ValueExpression>
                            <Value>tronprem-om-02%</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                    </And>
                  </Expression>
                </MembershipRule>
              </MembershipRules>
            </DataSource>
          </Discovery>

    I don't know the Java MP very well but it would the same process as above but with different classes specified.

    Cheers

    Graham


    Regards Graham Senior Premier Field Engineer (UK) - System Center Operations Manager

    • Proposed as answer by Elton_Ji Saturday, November 5, 2016 3:31 PM
    • Marked as answer by Elton_Ji Sunday, November 13, 2016 2:38 AM
    Friday, October 14, 2016 1:53 PM

All replies

  • Hi,

    https://social.technet.microsoft.com/Forums/en-US/b677a474-4039-4d97-a55b-eb4b31478d77/migrating-management-packs-with-dependencies-from-scom-2007-r2-to-scom-2012-r2?forum=operationsmanagermgmtpacks

    PAUL

    Wednesday, October 12, 2016 4:36 AM
  • I'm not sure of what you're trying to achieve, but maybe you should have a look at distributed applications?
    Wednesday, October 12, 2016 9:12 AM
  • Hi Andrew

    It is quite straight forward to do this in Visual Studio to make the Distributed Applications dynamic.

    You need to figure out the classes that you want to add to the Distributed Application and also which instances of those classes (so that you can use an expression filter). E.g. to include websites and SQL databases in a distributed application:

    1. Classes

          <!-- Distributed Application Classes - these groups (System.Groups) do not show up in the console under authoring, groups -->
            <ClassType ID="Fabrikam.Payments.DA" Base="System!System.Service" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
            <ClassType ID="Fabrikam.Payments.DA.ComponentGroup.ApplicationServers" Base="System!System.Group" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
            <ClassType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases" Base="System!System.Group" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
            <ClassType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsWebsites" Base="System!System.Group" Accessibility="Public" Abstract="false" Hosted="false" Singleton="true" />
    

    2. Relationships

     <TypeDefinitions>
        <EntityTypes>
          <RelationshipTypes>
    
            <!-- In this section, provide the Source (i.e. Parent) and Target (i.e. Child)
                 for this relationship. Also, review and update the Base attribute. 
                 More information can be found in the Management Pack Development Kit: 
                 http://msdn.microsoft.com/en-us/library/ee533533.aspx -->
            <RelationshipType ID="Fabrikam.Payments.DA.contains.Fabrikam.Payments.DA.ComponentGroup.ApplicationServers" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA"/>
              <Target ID="Target" Type="Fabrikam.Payments.DA.ComponentGroup.ApplicationServers"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.PaymentsDA.ComponentGroup.ApplicationServers.Contains.AppServers" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA.ComponentGroup.ApplicationServers"/>
              <Target ID="Target" Type="Fabrikam.Payments.AppServer"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.contains.Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA"/>
              <Target ID="Target" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases"/>
              <Target ID="Target" Type="MSL!Microsoft.SQLServer.Database"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.contains.Fabrikam.Payments.DA.ComponentGroup.Websites" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA"/>
              <Target ID="Target" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsWebsites"/>
            </RelationshipType>
            <RelationshipType ID="Fabrikam.Payments.DA.ComponentGroup.PaymentsApplication.ContainsWebsites" Base="System!System.Containment" Abstract="false" Accessibility="Internal">
              <Source ID="Source" Type="Fabrikam.Payments.DA.ComponentGroup.PaymentsWebsites"/>
              <Target ID="Target" Type="IIS2012!Microsoft.Windows.InternetInformationServices.6.2.WebSite"/>
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinitions>


    Example discovery to include a specific database in the DA:

         <Discovery ID="Fabrikam.Payments.Discover.Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases" Target="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases" Enabled="false" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="MSL!Microsoft.SQLServer.Database" />
              <DiscoveryRelationship TypeID="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
              <RuleId>$MPElement$</RuleId>
              <GroupInstanceId>$Target/Id$</GroupInstanceId>
              <MembershipRules>
                <MembershipRule>
                  <MonitoringClass>$MPElement[Name="MSL!Microsoft.SQLServer.Database"]$</MonitoringClass>
                  <RelationshipClass>$MPElement[Name="Fabrikam.Payments.DA.ComponentGroup.PaymentsDatabases.ContainsSQLDatabases"]$</RelationshipClass>
                  <Expression>
                    <And>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <Property>$MPElement[Name="MSL!Microsoft.SQLServer.Database"]/DatabaseName$</Property>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>Payments</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <Property>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Property>
                          </ValueExpression>
                          <Operator>Like</Operator>
                          <ValueExpression>
                            <Value>tronprem-om-02%</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                    </And>
                  </Expression>
                </MembershipRule>
              </MembershipRules>
            </DataSource>
          </Discovery>

    I don't know the Java MP very well but it would the same process as above but with different classes specified.

    Cheers

    Graham


    Regards Graham Senior Premier Field Engineer (UK) - System Center Operations Manager

    • Proposed as answer by Elton_Ji Saturday, November 5, 2016 3:31 PM
    • Marked as answer by Elton_Ji Sunday, November 13, 2016 2:38 AM
    Friday, October 14, 2016 1:53 PM