11 Replies Latest reply on May 5, 2015 2:14 AM by Marco Garruto

    Package CMDB Sync

    Alex Kim
      Share This:

      I noticed that CMDB CI Filter in CMDB Sync doesn't include Packages and ADDM discovers them so how can I sync those to CMDB, presumably BMC_PACKAGES.

        • 1. Re: Package CMDB Sync
          Kim Greenwood

          Alex, if you send me your contact information I would be glad to share our approach with you. The TPL is fairly simplistic but may provide you with the results you are looking to achieve.

          Kim

          • 2. Re: Package CMDB Sync
            Andrew Waters

            See here for an sync mapping than can map Packages to the CMDB.

            • 3. Re: Package CMDB Sync
              Alex Kim

              Andrew,

               

              this is what I get when clicked.

                

               

              The area of BMC Communities is visible to registered logged in users. If you are logged in when you receive this message then you might not have sufficient access privileges to view requested page. Please contact us if you need any further assistance.

              • 4. Re: Re: Package CMDB Sync
                Alex Kim

                How do I send private message?  Used to be a link to send email to a person

                • 5. Re: Package CMDB Sync
                  Andrew Waters

                  This was the sync mapping:

                   

                  tpl 1.5 module CMDB.NonStandard.Package_Product;

                  from CMDB.Host_ComputerSystem import Host_ComputerSystem 1.0;

                  syncmapping Package_Product 1.0
                      """
                      Example extension syncmapping.

                      Maps ADDM Package to BMC_Product.
                      """
                      overview
                          tags CMDB, NonStandard, Extension;
                      end overview;

                      mapping from Host_ComputerSystem.host as host
                          traverse Host:HostedSoftware:InstalledSoftware:Package as package

                              product -> BMC_Product;

                          end traverse;
                      end mapping;

                      body
                          computersystem := Host_ComputerSystem.computersystem;

                          for each package do

                              // In ADDM, Packages are shared by all Hosts. In the CMDB,
                              // they are per-computer system, so we must build a key
                              // containing both the Host key and the Package key.

                              product := sync.BMC_Product(
                                  key              := "%host.key%/%package.key%",
                                  Name             := package.name,
                                  ShortDescription := package.name,
                                  Model            := package.name,
                                  Description      := package.description,
                                  VersionNumber    := package.version,
                                  ManufacturerName := package.vendor,
                                  Category         := "Software",
                                  Type             := "Application",
                                  Item             := "BMC Discovered"
                              );

                              sync.rel.BMC_HostedSystemComponents(
                                  Source      := computersystem,
                                  Destination := product,
                                  Name        := "INSTALLEDSOFTWARE"
                              );
                          end for;

                      end body;

                  end syncmapping;

                   

                  Note that you have to be very careful doing this kind of thing. This has not filtering so it will produce a lot of nodes in the CMDB.

                  1 of 1 people found this helpful
                  • 6. Re: Re: Package CMDB Sync
                    Chris Hughes

                    Alex NameToUpdate wrote:

                     

                    How do I send private message?  Used to be a link to send email to a person

                    Select  "Create" off the menu bar - Find "message" on the sub menu!

                    • 7. Re: Package CMDB Sync
                      Alex Kim

                      Andrew,

                       

                      Thanks.  The reason, I asked this was because software instances are sync to CMDB but installed packages that was discovered by ADDM are not.  Is there a reason why this is not out of box?  It'll sync to BMC_Product, correct?

                      You also mentioned that it'll produce a lot of nodes in CMDB. what do you mean by that?

                      • 8. Re: Package CMDB Sync
                        Andrew Waters

                        I mean that there are lots of packages on machines. For example a standard RHEL6 appliance (a significantly cut down version of the OS) has 318 packages.

                         

                        The sync mapping above builds a BMC_Product for each Package.

                         

                        Packages are not synced by default because most are, in general, uninteresting and it creates an awful lot of BMC_Product nodes and the CMDB does not cope well with that number of nodes.

                        • 9. Re: Package CMDB Sync
                          Marco Garruto

                          Hi Andrew,

                          I've a doubt about sync tpl example, this tpl mark as delete CI BMC_Product on CMDB when I remove a software on server?

                           

                          Regards

                          Marco

                          • 10. Re: Package CMDB Sync
                            Andrew Waters

                            What exactly is your point?

                            • 11. Re: Package CMDB Sync
                              Marco Garruto

                              Hi Andrew,

                              I think this scenario...

                              1 - ADDM discover excel 2010 on host A

                              2 - After discovery, ADDM sync package and create CI BMC_Product excel 2010

                              3 - I remove/disinstall excel 2010 on host A

                              4 - ADDM discover host A and destroy pacakge node excel 2010 (is correct?)

                              5 - ADDM sync host node A, set to yes markasdelete attribute on CI BMC_Product excel 2010?

                               

                              Tnk

                              Marco