1 of 1 people found this helpful
No, you cannot use discovery.restfulGet against a device you have not discovered.
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 :-)
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.
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?
2 of 2 people found this helpful
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.
yes, this is exact what I meant, the 'old' response data will be delivered.
Thank you again!
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.
1 of 1 people found this helpful
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)