<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get Temperature report from OneView using API script? in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7196516#M8435</link>
    <description>&lt;P&gt;I'm sorry.&amp;nbsp; Just realized I posted getting the UUID from a downloaded file of all of the OneView hardware.&amp;nbsp; In order to query OneView directly for that, substitute the UUID= line above with these two lines:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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'})&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 14 Sep 2023 11:29:25 GMT</pubDate>
    <dc:creator>bradawk1</dc:creator>
    <dc:date>2023-09-14T11:29:25Z</dc:date>
    <item>
      <title>How to get Temperature report from OneView using API script?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7195080#M8383</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;We have 40 servers in the OneView and need to download Temperature inventory for each server in Microsoft Excel.&lt;/P&gt;&lt;P&gt;Please share the different methods to download customized Report from OneView. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 02:19:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7195080#M8383</guid>
      <dc:creator>Vinodh_Kumar_V</dc:creator>
      <dc:date>2023-08-31T02:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Temperature report from OneView using API script?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7195261#M8389</link>
      <description>&lt;P style="margin: 0;"&gt;Server status is refreshed every 20 minutes when there is no event from the iLO. &amp;nbsp;If you are looking for real-time temp monitoring or data collection,it is not possible.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;You will have to collect the data from individual server and insert it in excel.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Cheers....&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 04:09:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7195261#M8389</guid>
      <dc:creator>MV3</dc:creator>
      <dc:date>2023-08-29T04:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Temperature report from OneView using API script?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7196390#M8434</link>
      <description>&lt;P&gt;You can use the OneView REST API to get authenticated to the OneView appliance.&amp;nbsp; Then useing those credentials can get credentials to log into the iLO of each server.&amp;nbsp; Once you have that, you can use the iLO Redfish API to get thermal data.&amp;nbsp; There are lots of locations.&amp;nbsp; Here is just an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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 &amp;lt;&amp;lt;&amp;lt; $(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|^\(.*\)&amp;amp;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} &amp;gt; ${TMP}
   cat ${TMP} &amp;gt; thermal${i}
   ((i++))
done
#
((i--))
j=${i}
THERMAL=thermal
CMD=""
for (( i=1; i&amp;lt;=${j}; i++ )); do
   CMD="${CMD} ${THERMAL}${i}"
done
cat $(echo "${CMD}") &amp;gt; ${THERMAL}
/bin/rm ${THERMAL}? ${THERMAL}?? ${TMP}
#
jq -r '.serverName as $name | .Temperatures[] | { "serverName": $name,"Name":.name,"PhysicalContext":.PhysicalContext,"ReadingCelsius":.ReadingCelsius }' ${THERMAL}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 10:33:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7196390#M8434</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-09-13T10:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Temperature report from OneView using API script?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7196516#M8435</link>
      <description>&lt;P&gt;I'm sorry.&amp;nbsp; Just realized I posted getting the UUID from a downloaded file of all of the OneView hardware.&amp;nbsp; In order to query OneView directly for that, substitute the UUID= line above with these two lines:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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'})&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:29:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/how-to-get-temperature-report-from-oneview-using-api-script/m-p/7196516#M8435</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-09-14T11:29:25Z</dc:date>
    </item>
  </channel>
</rss>

