12 Replies Latest reply on Apr 30, 2018 12:18 AM by Theo Fondse

    CMDB Computer System CI Create using WebServices

    Deepak S

      What is the best method to create a CI via webservices? Can we directly create a webservice on the BMC.CORE:BMC_ComputerSystem and push data to it. I have created a stating form that receives data from JMS queue and am trying to push that to ComputerSystem form and uses a custom DataSet. But the OOTB functionality is not allowing to create. Has anyone done this ??

      Also please let me know how this can be achieved using REST calls.

       

      Message was edited by: Deepak Sukte

        • 1. Re: CMDB Computer System CI Create using WebServices
          Gustavo del Gerbo

          REST API support instance create:

           

          Create an instanceCreates new instance in a particular class./instance/{datasetId}/{namespace}/{className}POSTCreateInstance

           

          More info Operations on instance objects - BMC Atrium Core 9.1

           

          For Web Services:

           

          atrium_instances Exposes operations for the retrieving, creating, modifying, and deleting instances.

          https:// hostname: sslport/atriumws90/services/atrium_instances

          https:// hostname: sslport/atriumws90/services/atrium_instances.wsdl

           

          More info Atrium Web Services Archive and exposed web services - BMC Atrium Core 9.1

          • 2. Re: CMDB Computer System CI Create using WebServices
            Deepak S

            Thanks Gustavo, but I am looking this in the 8.1 version. Is this feature available in 8.1??

            • 3. Re: CMDB Computer System CI Create using WebServices
              Gustavo del Gerbo

              WebServices are available. REST Api is not.

              • 4. Re: CMDB Computer System CI Create using WebServices
                Deepak S

                Thanks lot...Can you please let me know if we can create a Computer System CI on the BMC_ComputerSystem form directly??

                • 6. Re: CMDB Computer System CI Create using WebServices
                  Chuck Welsh

                  Hi Gustavo,

                    So if you leverage a webservice to create/update the CI directly into the CDM ( BaseElement ) how do you ensure that a subsequent scan from say ADDM or BCM, reconciles to that CI.

                  • 7. Re: CMDB Computer System CI Create using WebServices
                    Carey Walker

                    Trust I've understood the question correctly, but I would imagine the web service includes the ability to nominate a dataset for the new CI. So yes it can go into BaseElement if that's the requirement (although it's more likely it will go into one of the sub-classes like ComputerSystem), but you would still specify a dataset other than BMC.ASSET, and follow the web services create phase with a recon. job on that dataset to get the data into BMC.ASSET. If it's new it will get created in BMC.ASSET, if it's existing it will get updated. Identification rules in later ADDM/BCM etc recon. jobs should allow you to recognise the now existing CI created via the web service call.

                    • 8. Re: CMDB Computer System CI Create using WebServices
                      Chuck Welsh

                      Greetings and Good Morning Carey,

                       

                        Indeed you have interpreted the inquiry correctly, and thank you for your appreciated feedback!!  The customer has java code that leverages web services for the creation/modification of a CI from BCM.  However they are not utilizing any aspect of recon.  Anticipating that the BCM recon jobs were active, we discovered they were not.  Continued efforts suggest the creations/modifications are occurring directly in BMC.Asset

                       

                      BCM-Recon.jpg

                       

                      Default- Recon Continuous.jpg

                       

                        We also checked the default continuous recon job, which although running, appears disturbing.  I can see via record review ( within the CDM - BaseElement ) that the custom ( customer created java program ) has created both a unique instanceID and reconID.  However I cannot ascertain any kind of reconciliation ( which should correlate to a BCM record within the BMC.FP.ASSETCORE dataset ).  So when searching on the reconID as depicted below... we return only one record, no corresponding BMC record... suggesting direct input.  Thoughts Carey or Gustavo?

                       

                      BaseElement.jpg

                      1 of 1 people found this helpful
                      • 9. Re: CMDB Computer System CI Create using WebServices
                        Carey Walker

                        Hi again Chuck

                         

                        I think this will end up being easy to sort out if we can tackle things one at a time.

                         

                        Look at BCM first - and I assume you mean BMC Configuration Manager. It should (and appears to have) a supplied Recon. job that includes suitable identification and merge steps. Can we see a screen shot of the job details like you've done for the BMC Default Continuous? I think we should ignore BMC Default Continuous for now and understand what the BMC CM side of things can do for us.

                         

                        The BCM recon job SHOULD show us it is using a BCM specific dataset to work in, the assumption being that the said dataset has been populated by BCM. I didn't think you needed to resort to web services to get data from BCM to the CMDB. I'm not a guru on BCM but is there not an out of the box mechanism for BCM->CMDB population?

                        • 10. Re: CMDB Computer System CI Create using WebServices
                          Theo Fondse

                          Deepak,  Carey Walker is correct about having to create a dedicated dataset and submitting records into the sub-classes as well as having to use a recon job to bring the data into BMC Asset.

                           

                          Warning: It is NEVER a good idea to write directly to the BMC.ASSET dataset - even from a trusted source. That is like buying a car and then taking out the engine so you can push the car around yourself.....

                          Writing directly to BMC.ASSET effectively bypasses the CMDB's data reconciliation functionality which aims to protect the CMDB from being populated with duplicate or junk data and puts the responsibility for CMDB data quality on your developer writing the code that writes to BMC.ASSET.

                           

                          We are currently doing a similar project where we have created a staging form that is used by an in-house Java developed system to send transactions via WebService to create or update the CI's into the extended ComputerSystem class. There is a dedicated dataset that was created for this purpose. Workflow on the staging form verifies, sanitizes and enrich specific custom aspects of the data before pushing clean data into the dedicated dataset. We created a continuous recon job to promote the CI's from this dataset into BMC Asset.

                           

                          Be sure to submit the CI record into your custom dataset with ReconID = 0 (this allows the CMDB to determine the ReconID and prevent scenario's where the same ReconID could be used for different CI's by mistake, causing data loss)

                          Then let a Recon Job ID and Merge it into BMC.ASSET. This way you enable the CMDB to do what you bought it for.

                          • 12. Re: CMDB Computer System CI Create using WebServices
                            Theo Fondse

                            Hi Chuck,

                             

                            You will probably need to add a new schedule for this job to run as per your first screencap, or make it a continuous job.

                            (Be sure to start the job for the first time manually thereafter)

                            1 of 1 people found this helpful