Getting Started creating a CMDB Syncmapping Extension pattern

Version 6
    Share This:

    NOTE: Please test all new patterns in a TEST environment!

     

    Disclaimer: 

    Any patterns provided in the communities, provided by Users and by BMC employees are not part of the product, and are not necessarily thoroughly tested.

    Use at your own risk.

     

    How to get Started creating CMDB Syncmapping Extension patterns:  Getting Started creating a CMDB Syncmapping Extension pattern

    Info about custom patterns and syncmappings, how to test, etc:  Helix Support: Discovery custom patterns discussion

    Sample syncmapping 'stubs' / starting points :  Helix Support: Discovery: Sharing my library of syncmapping extension stubs

    Sample patterns and syncmappings posted by Lisa:  https://goo.gl/8KUS3S

     

    How to Begin to create a CMDB Syncmapping Extension:

     

    STEP#1: Make a Plan

     

    Fully describe the Source of the data and the Target of the data.

     

    SOURCE:

    What nodes and attributes in Discovery contain the data you want to sync to the CMDB?

    If you can't find the data in Discovery, then you can't put it in the CMDB.

    If the data does not exist in Discovery, then you need a Discovery custom pattern to put the data into Discovery before working on a syncmapping pattern.

     

    TARGET:

    What Class / CI type in the CMDB should receive the data?  And, what attributes in the Class should be populated?

    If there is not an existing class in the CMDB, or the attributes do not exist, then those need to be created in the CMDB first.

     

    Example of a Plan:

    I want to sync the data from the Package nodes in Discovery to the BMC_Package class in the CMDB.

    Here are the important attributes to populate on BMC_Package:

                    Name      

                    NameFormat

                    ShortDescription

                    Model      

                    LastScanDate 

                    Description

                    VersionNumber

                    BuildNumber 

                    ManufacturerName

                    MarketVersion

                    TokenID     

                    Category

                    Type          

                    Item       

                    Company     

     

    And, here is how to populate the CMDB attributes from Discovery (on the right):

                               Name             := "%package.name%:%package.version%",

                    NameFormat       := "PackageName:Version",

                    ShortDescription := "%package.name% %package.version%",

                    Model            := package.name,

                    LastScanDate     := host.last_update_success,

                    Description      := "%package.name% on %host.name%",

                    VersionNumber    := package.version,

                    BuildNumber      := package.revision,

                    ManufacturerName := package.vendor,

                    MarketVersion    := package.version,

                    TokenID          := "%package.name%:%package.version%",

                    Category         := "Software",

                    Type             := "Software Distribution",

                    Item             := "Package",

                    Company          := computersystem.Company

     

    Note, we already have a syncmapping for this problem in the community:  Syncmapping to populate BMC_Patch and BMC_Package

     

     

     

     

         STEP#2:  To create a CMDB Syncmapping pattern extension, first find the "base" pattern that you want to extend.

     

          There are 2 potential methods. I use the 1st method, but the 2nd method may be easier for you.

     

          1) To find the base CMDB Syncmapping patterns, unzip a TKU archive file, and drill down to the "TKU-System" folder.   The "TKU-System" folder contains the syncmapping patterns, in addition to some other miscellaneous patterns.

     

     

    or

    2) Look in the Discovery GUI, like this:

      Manage->Knowledge

      Drill down to:  BMC Discovery Operations-> CMDB Sync

     

     

    STEP#3: Review your plan:

                    If you need to add new attributes to the class in the CMDB, do so now.

                    If you need to add a new class to the CMDB, do so now.

                   After you add the new attributes or add a new class, be sure to restart the Discovery services so that Discovery finds the new attributes or classes that you added.

                   Otherwise, your pattern will not work at all.

     

    STEP#4:  If you want to add information from a node in Discovery that is currently not sync'd to the CMDB, you will need to figure out how to traverse to that node from the node in the pattern you are starting with.  Use the "customize" feature to figure out how to traverse to the data you want.  After you get the data, then display the raw query to see the traversal.

    The traversal will be the basis for the "mapping from" statement in your custom pattern.

     

     

    More steps and examples to be added later.