1 2 Previous Next 25 Replies Latest reply on Mar 23, 2020 10:36 AM by Gene Slaughter

    CMDB Sync Error

    Ryan Nicosia
      Share This:

      Thanks to all that provided input on my custom sync mappings for EOL and EOS data.  I tested those patterns for Computersystem, Product, and OS and all are working.  I've now gone ahead and extended the CMDB as I was just pushing to AccountID as a test.

       

      I've extended BMC_BaseElement with 3 new fields for EOL, EOS, and EOES dates from Discovery.  Fields are all showing up on BaseElement, ComputerSystem, etc, etc in Remedy without issue and I can also enter a date manually.

       

      I've restart Discovery cluster and when I try to sync one host as a test, I am getting following error:

       

      Failed update of BMC_ComputerSystem:servername : ERROR (120007): Internal error occurred during processing.; java.lang.ClassCastException (120007)

       

      Any ideas?

        • 1. Re: CMDB Sync Error
          Ryan Nicosia

          The 3 fields I added to CDM are "Date" fields.  Maybe that is the issue?

          • 2. Re: CMDB Sync Error
            Ryan Nicosia

            Appears that is the issue.  I modified the fields in CDM to Date/Time and all is working

            2 of 2 people found this helpful
            • 3. Re: CMDB Sync Error
              Alessandro Vasselli

              Hi Ryan,

              I'm trying also to sync EOL EOS and EOES on Operating Systems, but I have the same java lang error even after modified the format to Date/Time.

              MAy I ask you to share with me the TPL you tested ok at least for the Operating Systems.

              Thank you in advance

              Alessandro

              • 5. Re: CMDB Sync Error
                Andrew Waters

                "Not Set" is not the value of the attribute. It is something shown in the UI to make it obvious there is no value. So your if tests are always returning true and doing the assignment.

                1 of 1 people found this helpful
                • 6. Re: CMDB Sync Error
                  Ryan Nicosia

                  So, would this work?

                   

                  if sptedetail.end_support_date then

                  • 7. Re: CMDB Sync Error
                    Andrew Waters

                    That would skip unset values.

                    1 of 1 people found this helpful
                    • 8. Re: CMDB Sync Error
                      Lisa Keeler

                      Yes, this would be equivalent to what you were trying to do in your pattern:

                       

                      if sptedetail.end_support_date then

                          opsys.EOSDate := sptedetail.end_support_date;

                      end if;

                      1 of 1 people found this helpful
                      • 9. Re: CMDB Sync Error
                        Alessandro Vasselli

                        Hi Ryan,

                        many thanks for sharing your work!

                        You have been very very kind!

                        I'm expanding the logic to Hosts, Network Devices and Products.

                        If you are interested, I'll share my work with you as soon as I completed the task.

                        All my best regards

                        Alessandro

                        • 10. Re: CMDB Sync Error
                          Ryan Nicosia

                          I've already got sync mappings for hosts, product, and network devices. 

                          • 11. Re: CMDB Sync Error
                            Gene Slaughter

                            Hi Ryan & Alessandro,

                             

                            Would either of you like to post your finished product(s) for EOL/EOS/EOES for HW (Hosts/NetworkDevices/StorageDevices) and SW(SI's/RE's) ?

                            Ryan, your OS one is quite useful with Lisa's suggestions, Thanks!  

                            • 12. Re: CMDB Sync Error
                              Ryan Nicosia

                              10 from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.0;

                              11

                              12 syncmapping ComputerSystem_EOL_Augment 1.0

                              13    """

                              14   Sync EOL and EOS dates into CMDB

                              15   """

                              16    overview

                              17    tags CMDB, Extension;

                              18    end overview;

                              19

                              20   mapping from Host_ComputerSystem.host as host

                              21

                              22 traverse ElementWithDetail:SupportDetail:HardwareDetail:SupportDetail as sptdetail

                              23 end traverse;

                              24    end mapping;

                              25

                              26    body

                              27   computersystem := Host_ComputerSystem.computersystem;

                              28

                              29    for each sptdetail do

                              30   if sptdetail.retirement_date then

                              31   computersystem.EOLDate := sptdetail.retirement_date;

                              32   end if;

                              33

                              34   if sptdetail.end_ext_support_date then

                              35 computersystem.EOESDate := sptdetail.end_ext_support_date;

                              36   end if;

                              37

                              38   if sptdetail.end_support_date then

                              39 computersystem.EOSDate := sptdetail.end_support_date;

                              40   end if;

                              41   end for;

                              42 end body;

                              43

                              44   end syncmapping;

                              1 of 1 people found this helpful
                              • 13. Re: CMDB Sync Error
                                Ryan Nicosia

                                from CMDB.NetworkDevice_ComputerSystem import NetworkDevice_ComputerSystem 2.1;

                                 

                                 

                                syncmapping NetworkDevice_Augment 1.0

                                    """

                                    Add EOL Dates to Network Devices in CMDB

                                    """

                                    overview

                                        tags CMDB, Extension;

                                    end overview;

                                 

                                 

                                    mapping from NetworkDevice_ComputerSystem.device as device

                                 

                                traverse ElementWithDetail:SupportDetail:HardwareDetail:SupportDetail as sptdetail

                                end traverse;

                                    end mapping;

                                 

                                 

                                    body

                                        device_cs := NetworkDevice_ComputerSystem.device_cs;

                                 

                                 

                                        for each sptdetail do

                                      if sptdetail.retirement_date then

                                 

                                 

                                           device_cs.EOLDate := sptdetail.retirement_date;

                                          end if;

                                 

                                  if sptdetail.end_ext_support_date then

                                 

                                 

                                            device_cs.EOESDate := sptdetail.end_ext_support_date;

                                          end if;

                                 

                                  if sptdetail.end_support_date then

                                 

                                 

                                            device_cs.EOSDate := sptdetail.end_support_date;

                                          end if;

                                 

                                    end for;

                                end body;

                                 

                                 

                                end syncmapping;

                                1 of 1 people found this helpful
                                • 14. Re: CMDB Sync Error
                                  Ryan Nicosia

                                  from CMDB.SoftwareInstance_Product import SoftwareInstance_Product 1.0;

                                   

                                   

                                  syncmapping SoftwareInstance_Augment 1.5

                                      """

                                      Add one or more new attributes to the BMC_Product CI, based

                                      on attributes in the BMC Discovery SoftwareInstance node.

                                      """

                                      overview

                                          tags CMDB, Extension;

                                      end overview;

                                   

                                   

                                      mapping from SoftwareInstance_Product.softwareinstance as softwareinstance

                                          // No additional structure -- we are just modifying the

                                          // existing SoftwareServer CI.

                                   

                                  traverse ElementWithDetail:SupportDetail:SoftwareDetail:SupportDetail as sptdetail

                                  end traverse;

                                      end mapping;

                                   

                                   

                                      body

                                          product := SoftwareInstance_Product.product;

                                   

                                   

                                          for each sptdetail do

                                        if sptdetail.retirement_date then

                                   

                                   

                                              product.EOLDate := sptdetail.retirement_date;

                                            end if;

                                   

                                    if sptdetail.end_ext_support_date then

                                   

                                   

                                              product.EOESDate := sptdetail.end_ext_support_date;

                                            end if;

                                   

                                    if sptdetail.end_support_date then

                                   

                                   

                                              product.EOSDate := sptdetail.end_support_date;

                                            end if;

                                   

                                      end for;

                                  end body;

                                   

                                   

                                  end syncmapping;

                                  1 of 1 people found this helpful
                                  1 2 Previous Next