StoreOnce Backup Storage
1832880 Members
2614 Online
110048 Solutions
New Discussion

REST call to report serial numbers for hard drives in system

 
Mr_Tomahawk
Occasional Contributor

REST call to report serial numbers for hard drives in system

I'm trying to collect the serial numbers for all hard drives in a 5650 system.  I'm looking in the help for the API at https://hewlettpackard.github.io/storeonce-rest/index.html but I'm not able to find a way to retrieve ths information from

/hwmonitor

or 

/api/v1/management-services

 is it possible to retreive this information, and if so then how? 

The URL for where this data would be found from witinn the browser is:

https://<ip>/ui/index.html#/settings/hwmonitoring

Then under Data Storage

Controllers

Enclosures

Drawers

Drives

5 REPLIES 5
sbhat09
HPE Pro

Re: REST call to report serial numbers for hard drives in system

Hello @Mr_Tomahawk

What is the StoreOnce OS version?

Regards,
Srinivas Bhat



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
sbhat09
HPE Pro

Re: REST call to report serial numbers for hard drives in system

Hello @Mr_Tomahawk,

In the GUI, go to the main menu -> hardware health status on the top left corner -> click on storage tab on the top -> expand the PCI-E slot expand the enclosure -> expand the port -> expand the drawer -> click on the dedail (i) icon. YOu will see the model and serial number of the drive

Regards,
Srinivas Bhat

If you feel this was helpful please click the KUDOS! thumb below!
Note: All of my comments are my own and are not any official representation of HPE.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Mr_Tomahawk
Occasional Contributor

Re: REST call to report serial numbers for hard drives in system

I know how to get the information via the browser... that is exactly what I outlined in my question.

The problem is I need to export this data into a spreadsheet, and then browser will only show the information for one drive at a given time, and so the result is very tedious in trying to collect all of the serials for all of the drives of a given system.

 

The specific version I am running is 4.2.3-2011.40

 

Using the Google Chrome network inspector of the dev tools it looks as though this information is presented in the browser using https://<ip>/hwmonitor/servers?listDetailed=true

So I guess i will down the rout of trying to do a GET request to this API, hoping it will return what I am looking for.

neutral
HPE Pro

Re: REST call to report serial numbers for hard drives in system

Hello @Mr_Tomahawk ,

One way of getting the 'serial number' is: 

Download slim logs (Settings -> Log collection -> + button -> select slim and Generate ).

Download and extract the slim logs, you will see the 'serial number' in storage_clusterxxx.xml file. 

Regards,
Ashik N S

If you feel this was helpful please click the KUDOS! thumb below!


I am an HPE Employee
Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise

Accept or Kudo

Mr_Tomahawk
Occasional Contributor

Re: REST call to report serial numbers for hard drives in system

I was able to follow this however it took quite long to get the log collection, and then required the tar.bz to un compressed into a .tar, which then had to be uncompressed again, followed drilling with multiple subfolders to find the xml file(s) which you identified, which then need XPath queries ran against in order to extract the data which I'm looking for.

 

Thank you for this, but this is far more work then it should be and requires manual intervention.  This was so much easier to get via the CLI in 3.x.  Really I need to figure the API Rest call(s) which I need/could do since this looks to be the most ideal in the 4.x of the StoreOnce's, and this prcedure is something which neds to be collected and validated on a routine basis at my work.