<?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 all SEL log via restful api(redfish) in Unified Computing System (UCS)</title>
    <link>https://community.cisco.com/t5/unified-computing-system-ucs/how-to-get-all-sel-log-via-restful-api-redfish/m-p/4509711#M43</link>
    <description>&lt;P&gt;Hi Kd,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use below script to get the SEL logs using Redfish API:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sandkum5/cimc-get-sel-logs" target="_blank" rel="noopener"&gt;https://github.com/sandkum5/cimc-get-sel-logs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the log count, you would need to send a request to&amp;nbsp;&lt;SPAN&gt;redfish/v1/Chassis/1/LogServices/SEL/Entries/?$top=1&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Function&amp;nbsp;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;get_sel_log_count has the logic to get the count.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;To get sel logs in pages, you would need to use skip and count.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;E.g. Below link will get sel log entries from 201 to 400.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;redfish/v1/Chassis/1/LogServices/SEL/Entries/?$skip=200&amp;amp;$top=200&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please let me know if you still have any questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sandeep&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 05:28:32 GMT</pubDate>
    <dc:creator>Sandeep Kumar</dc:creator>
    <dc:date>2021-11-29T05:28:32Z</dc:date>
    <item>
      <title>How to get all SEL log via restful api(redfish)</title>
      <link>https://community.cisco.com/t5/unified-computing-system-ucs/how-to-get-all-sel-log-via-restful-api-redfish/m-p/4416231#M28</link>
      <description>&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;According to the example of official website&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt; curl -GET https://10.10.10.10/redfish/v1/Managers/CIMC/LogServices
/SEL/Entries\?\$skip=2\&amp;amp;\$top=2 -u admin:admin123 --insecure&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;The upper example code can get top two and skipping two records of sel log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;curl -GET https://10.10.10.10/redfish/v1/Chassis/1/LogServices/SEL/Erestfurestful api redfish SELl api redfish SELntries/ -k -u admin:Admin123&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;The example code can get the top 50 records of sel log by default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question is:&amp;nbsp; how to get all sel log with one http "get" request?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I don't want to get the total record number of sel log, then get sel log record by record. I just want to get all sel log with one or few http request (As I know, the upper limit of record fetching in one return is 500)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;I also find two questions&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. In address "&lt;STRONG&gt;redfish/v1/Chassis/1/LogServices/SEL/Entries&lt;/STRONG&gt;/" , I can't find total number of record of sel log and left number of record of sel log&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. In address "&lt;STRONG&gt;redfish/v1/Chassis/1/LogServices/SEL/Entries&lt;/STRONG&gt;/" , I can't find the url link to next 50 record of sel log.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. Does Cisco support parameter "expand"?&amp;nbsp; Refer to the DMTF specification.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;$skip&lt;/TD&gt;&lt;TD&gt;Integer indicating the number of Members in the Resource Collection to skip before retrieving the first resource.&lt;/TD&gt;&lt;TD&gt;&lt;A href="http://resourcecollection/?$skip=5" target="_blank" rel="noopener nofollow noreferrer"&gt;http://resourcecollection?$skip=5&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$top&lt;/TD&gt;&lt;TD&gt;Integer indicating the number of Members to include in the response. The minimum value for this parameter is 1. The default behavior is to return all Members.&lt;/TD&gt;&lt;TD&gt;&lt;A href="http://resourcecollection/?$top=30" target="_blank" rel="noopener nofollow noreferrer"&gt;http://resourcecollection?$top=30&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$expand&lt;/TD&gt;&lt;TD&gt;Include data from links in the resource inline within the current payload, depending on the value of the expand.&lt;/TD&gt;&lt;TD&gt;&lt;A href="http://resourcecollection/?$expand=.($levels=1" target="_blank" rel="noopener nofollow noreferrer"&gt;http://resourcecollection?$expand=.($levels=1&lt;/A&gt;)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$select&lt;/TD&gt;&lt;TD&gt;Include a subset of the properties of a resource based on the expression specified in the query parameters for this option.&lt;/TD&gt;&lt;TD&gt;&lt;A href="http://resourcecollection/?$select=SystemType,Status" target="_blank" rel="noopener nofollow noreferrer"&gt;http://resourcecollection?$select=SystemType,Status&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$filter&lt;/TD&gt;&lt;TD&gt;Include a subset of the members of a collection based on the expression specified in the query parameters for this option.&lt;/TD&gt;&lt;TD&gt;&lt;A href="http://resourcecollection/?$filter=SystemType" target="_blank" rel="noopener nofollow noreferrer"&gt;http://resourcecollection?$filter=SystemType&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;eq 'Physical'&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 10 Jun 2021 16:00:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/unified-computing-system-ucs/how-to-get-all-sel-log-via-restful-api-redfish/m-p/4416231#M28</guid>
      <dc:creator>kdy77k@gmail.com</dc:creator>
      <dc:date>2021-06-10T16:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all SEL log via restful api(redfish)</title>
      <link>https://community.cisco.com/t5/unified-computing-system-ucs/how-to-get-all-sel-log-via-restful-api-redfish/m-p/4509711#M43</link>
      <description>&lt;P&gt;Hi Kd,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use below script to get the SEL logs using Redfish API:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sandkum5/cimc-get-sel-logs" target="_blank" rel="noopener"&gt;https://github.com/sandkum5/cimc-get-sel-logs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the log count, you would need to send a request to&amp;nbsp;&lt;SPAN&gt;redfish/v1/Chassis/1/LogServices/SEL/Entries/?$top=1&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Function&amp;nbsp;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;get_sel_log_count has the logic to get the count.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;To get sel logs in pages, you would need to use skip and count.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;E.g. Below link will get sel log entries from 201 to 400.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="pl-en"&gt;&lt;SPAN class="pl-token" data-hydro-click="null" data-hydro-click-hmac="null"&gt;redfish/v1/Chassis/1/LogServices/SEL/Entries/?$skip=200&amp;amp;$top=200&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please let me know if you still have any questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sandeep&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 05:28:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/unified-computing-system-ucs/how-to-get-all-sel-log-via-restful-api-redfish/m-p/4509711#M43</guid>
      <dc:creator>Sandeep Kumar</dc:creator>
      <dc:date>2021-11-29T05:28:32Z</dc:date>
    </item>
  </channel>
</rss>

