HPE 3PAR StoreServ Storage
1833356 Members
3229 Online
110051 Solutions
New Discussion

Re: Get environment data (temperatures)

 
BradV
Esteemed Contributor

Get environment data (temperatures)

I'm searching through the web services api developer guide, but have not found what I am looking for.  I want to be able to query our storeservs and get back temperature information.  I know in the CLI I can use shownodenv or showcage to retrieve temperatures, but I would like an API call to get that information.  Does anyone know how to retrieve that?  I'm sure I'm just not searching with the correct terminology.

4 REPLIES 4

Re: Get environment data (temperatures)

I did a quick search in the "HPE 3PAR Web Services API 1.6.15 Developer Guide"

https://support.hpe.com/hpesc/public/docDisplay?docId=c03606339

Looks like the temperature is returned back in various possible disk data queries. E.g.

page 512:

Requesting At Time physical disk space data

To request an At Time physical disk performance data report, use the HTTP GET method with the following URI:https://<storage_system>:8080/api/v1/systemreporter/attime/physicaldiskspacedata/<samplefreq>;groupby:<groupby>;compareby:<compareby>;summary:<summaryField>[?<query expression>]

Search for "temperatureC". You will find a couple of places.

Hope that helps.



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
BradV
Esteemed Contributor

Re: Get environment data (temperatures)

Yes, I found that.  Working on getting the query to work.    I'll report back when I get it figured out.  Thanks!

BradV
Esteemed Contributor

Re: Get environment data (temperatures)

I'm trying:

 

TIM=vstime
COMP=physicaldiskspacedata
REPID=hourly
ACTV=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])" "sampleTime GE $(date +'%Y-%m%dT%T+00:00 --date='1 day ago') AND sampleTime LE $(date +'%Y-%m%dT%T+00:00)")
curl --silent --insecure --header "X-HP3PAR-WSAPI-SessionKey: ${sessionID}" https://${STORSRV}:8080/api/v1/systemreporter/${TIM}/${COMP}/${REPID}?query="${ACTV}" | jq -r '.'

 

but I get back:

 

{
  "code": 148,
  "desc": "Invalid Query String"
}

 

I think that syntax is correct?  Still looking.  FYI, we are running version 3.3.1.648

BradV
Esteemed Contributor

Re: Get environment data (temperatures)

We determined that the command is good.  It works on our other storservs.  This storserv had a problem last week and one of the controllers died.  We think that is the reason the command is not working here.