- Community Home
- >
- Software
- >
- HPE OneView
- >
- Re: How to get Temperature report from OneView usi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2023 11:23 PM - last edited on 08-30-2023 07:19 PM by support_s
08-26-2023 11:23 PM - last edited on 08-30-2023 07:19 PM by support_s
How to get Temperature report from OneView using API script?
Hello Team,
We have 40 servers in the OneView and need to download Temperature inventory for each server in Microsoft Excel.
Please share the different methods to download customized Report from OneView. Thanks!
- Tags:
- Prolaint server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 09:09 PM
08-28-2023 09:09 PM
Re: How to get Temperature report from OneView using API script?
Server status is refreshed every 20 minutes when there is no event from the iLO. If you are looking for real-time temp monitoring or data collection,it is not possible.
You will have to collect the data from individual server and insert it in excel.
Cheers....
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]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 03:31 AM - edited 09-13-2023 03:33 AM
09-13-2023 03:31 AM - edited 09-13-2023 03:33 AM
Re: How to get Temperature report from OneView using API script?
You can use the OneView REST API to get authenticated to the OneView appliance. Then useing those credentials can get credentials to log into the iLO of each server. Once you have that, you can use the iLO Redfish API to get thermal data. There are lots of locations. Here is just an example:
i=1
TMP=$(mktemp)
for SERVER in my-server-r{1..2}-n{1..12}.myorg.com; do
echo "Getting thermal data from ${SERVER}"
UUID=$(jq -r '.members[] | select(.serverName=="'${SERVER}'") | "\'(.uuid)"' ${HARDW}
read iLOSSO iLOAuth <<< $(curl --insecure --silent --header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" --request GET ${OneView}/rest/server-hardware/${UUID}/remoteConsoleUrl | \
jq -r '.remoteConsoleUrl' | sed -e 's|hplocons|https' -e 's|addr=||' -e 's|^\(.*\)&sessionkey=\(.*\)$|\1 \2')
curl --insecure --silent --output thermal${i} --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1/chassis/1/thermal
jq '. + { "serverName": "'${SERVER}'" }' thermal${i} > ${TMP}
cat ${TMP} > thermal${i}
((i++))
done
#
((i--))
j=${i}
THERMAL=thermal
CMD=""
for (( i=1; i<=${j}; i++ )); do
CMD="${CMD} ${THERMAL}${i}"
done
cat $(echo "${CMD}") > ${THERMAL}
/bin/rm ${THERMAL}? ${THERMAL}?? ${TMP}
#
jq -r '.serverName as $name | .Temperatures[] | { "serverName": $name,"Name":.name,"PhysicalContext":.PhysicalContext,"ReadingCelsius":.ReadingCelsius }' ${THERMAL}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 04:29 AM
09-14-2023 04:29 AM
Re: How to get Temperature report from OneView using API script?
I'm sorry. Just realized I posted getting the UUID from a downloaded file of all of the OneView hardware. In order to query OneView directly for that, substitute the UUID= line above with these two lines:
ACTV=$(python3 -c "import urllib.parse, sys; print urllib.parse.quote(sys.argv[1])"'serverName' = '${SERVER}'\"")
UUID=$(curl --insecure --header "X-API-Version: ${currentVersion}" --header "auth: ${sessionID}" --silent \
--request GET ${OneView}/rest/server-hardware?filter=${ACTV} | jq -r '.members[] | .uuid'})