Redfish devices discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2025 10:18 PM - edited ‎04-16-2025 10:19 PM
Hi Team,
Has anyone successfully implemented the discovery of devices supporting the Redfish protocol?
ServiceNow support has confirmed that out-of-the-box (OOB) probes/patterns for discovering these devices are not available, and we will need a complete end-to-end customization.
If you have experience with this implementation, please let me know the steps for it
Thanks, Pavan BV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2025 11:05 PM
Hi @PavanBV
Check this
https://www.servicenow.com/community/itom-forum/hp-ilo-discovery/m-p/3145763
Kindly mark my answer as helpful and accept solution if it helped you in anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 03:18 AM - edited ‎04-21-2025 03:19 AM
Thanks @swapnali ombale , I was able to create a custom classifier and call the Redfish API to pull the data. But i am facing issue while setting the name of the CI form the API response. If you have any leads around this, please let me know.
GetResponse output structure is like below
{
"Name":"ABC",
"SerialNumber":"1234",
"PowerState":"xx",
"BiosVersion":"1234v1",
}
In the 2nd Step "Set Name" i am using below code
var parsedResponse = JSON.parse("$GetResponse");
var name = parsedResponse.Name;
return name;
I am setting this name to the Name field on the CI that i wanted to create
Error:
: Failed to set attribute due to the following error: JAVASCRIPT_CODE_FAILURE: org.mozilla.javascript.EvaluatorException: invalid return (ad_hoc:EvalClosure-Untitled Step-774752959; line 4)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 04:10 AM
Hi @PavanBV
var parsedResponse = JSON.parse($GetResponse); // Remove quotes if $GetResponse is already a string
var name = parsedResponse.Name;
return name;
If $GetResponse is a string literal already substituted (i.e., includes quotes when you inspect the actual value): Keep the quotes in JSON.parse("$GetResponse").
If $GetResponse is already a JavaScript object or the raw string without quotes: Remove the quotes like: JSON.parse($GetResponse).
Kindly mark my answer as helpful and accept solution if it helped you in anyway.