9 Replies Latest reply on Nov 12, 2019 1:22 AM by Andrew Waters


    Viktor Marinov
      Share This:

      Hello Andrew Waters and hello all,


      We have the following use case: we just need to pull additional data from one source over REST API, as there is no integration point available (no direct DB access).

      This system is not meant to be discovered, only the data is there. According to:


      discovery.restfulGet(target, protocol, path[, headers, port, use_http])


      the target has to be a node (for example DA). Can we somehow access this system over REST API without discovering it? I suppose no, but if yes, what should we pass as target?


      Thank you for your answer in advance.

        • 1. Re: discovery.restfulGet
          Andrew Waters

          No, you cannot use discovery.restfulGet against a device you have not discovered.

          1 of 1 people found this helpful
          • 2. Re: discovery.restfulGet
            Viktor Marinov

            Thank you, Andrew Waters! Have a great day.

            • 3. Re: discovery.restfulGet
              Viktor Marinov

              Hi Andrew Waters,


              so if we need to use REST API we should scan the machine (ssh) where the webservice/REST is running? So to have successful DA (UNIX/Windows login) and pass it as 'target' parameter?

              And then ADDM will switch from for example UNIX credentials used to discover the host to Webservices credentials which are also entered?


              This is not going to work like scanning of vCenter appliances where you dont use UNIX creds and ADDM just detects it is an appliance and directly log in using vCenter creds?


              Sorry for so many questions, just trying to get this done :-)



              • 4. Re: discovery.restfulGet
                Andrew Waters

                You would need to discover the machine running the REST server.


                However, if you make the same RESTful request to the REST server without scanning it again Discovery will optimise the request returning the result from the previous request.

                • 5. Re: discovery.restfulGet
                  Viktor Marinov

                  Okay, so it's clear we have to scan the system.


                  If we scan it once, on second request this optimization will return the same DA oder the same data which was requested previously and is stored as some DDD node or both?

                  • 6. Re: discovery.restfulGet
                    Andrew Waters

                    I do not understand this question.


                    As I said, after you scan the REST server, the first request (including URL, parameters) will do a RESTfil request against the REST server. If you do another request with the same parameters without scanning the REST server Discovery will not make the request but instead return the last response.

                    2 of 2 people found this helpful
                    • 7. Re: discovery.restfulGet
                      Viktor Marinov

                      Hi Andrew,


                      yes, this is exact what I meant, the 'old' response data will be delivered.


                      Thank you again!

                      • 8. Re: discovery.restfulGet
                        Scott Delker


                        Apologies if this has been explained elsewhere or if my skull is just too thick; I'd like to discuss this discovery.restfulget scenario a bit further.  Here's a use case;


                        I have a device, "Server X", which is home to a registry of information about all other devices allowed to be on the network.


                        For each device on the network, Server X stores information such as;

                        • A unique internal ID#
                        • The identity of the person who owns the device,
                        • If the owner has requested that the device be monitored by our TSOM system,
                        • What kind of environment is the device -- PROD/QUAL/DEV/etc,
                        • Is there an ITSM support group known to be associated with the device,
                        • etc, etc


                        Server X offers a REST API that responds to GET requests for a summary of this (otherwise undiscoverable) device metadata in json format.


                        During our daily Discovery run, as each device is scanned, I'd like to call the GET device metadata REST API on Server X, and store one or two key bits of that metadata as extended attributes of the directly discovered data.  Is this something that discovery.restfulget would be able to do?


                        We already use the BMC provided pattern templates to extend the discovery of the hosts and network devices.  If discovery.restfulget can be used as I've described above, would you recommend this code be incorporated into our existing host and network device extension patterns?


                        Thanks for the extra explanation.




                        • 9. Re: discovery.restfulGet
                          Andrew Waters

                          You can only successfully call discovery.restfulGet against

                          * something which has been discovered,

                          * an endpoint which is in a scanning window, e.g. the interval allowed by a scheduled scan, unless "Allow scans even if no window defined" is set to yes (docs)

                          1 of 1 people found this helpful