<?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: Get last two http status for every subpage in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-last-two-http-status-for-every-subpage/m-p/463687#M130720</link>
    <description>&lt;P&gt;sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd_ui_access
| reverse
| streamstats global=f list(status) as last2Status window=2 by uri_path
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;use &lt;CODE&gt;list()&lt;/CODE&gt; with &lt;CODE&gt;global=f&lt;/CODE&gt; option.&lt;/P&gt;</description>
    <pubDate>Sun, 31 May 2020 01:47:14 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-05-31T01:47:14Z</dc:date>
    <item>
      <title>Get last two http status for every subpage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-last-two-http-status-for-every-subpage/m-p/463686#M130719</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I need to query all last two http status for every page (extracted from URI)&lt;/P&gt;
&lt;P&gt;For example for this log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ip_address - - [23/May/2020:18:22:16] "GET /test HTTP 1.1" 200 1665 "http://www.testwebsite.com/test "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5" 159

ip_address - - [23/May/2020:19:24:09] "GET /test HTTP 1.1" 404 2301 "http://www.testwebsite.com/test" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5" 159
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'd like to query for page /test two last codes, in this case 404 and 200.&lt;/P&gt;
&lt;P&gt;I tried something with streamstats but I dont really know how to combine this into one single query:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;|  streamstats values(status) by uri_path window=2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2020 18:12:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-last-two-http-status-for-every-subpage/m-p/463686#M130719</guid>
      <dc:creator>ezoteriusz</dc:creator>
      <dc:date>2020-06-08T18:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get last two http status for every subpage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-last-two-http-status-for-every-subpage/m-p/463687#M130720</link>
      <description>&lt;P&gt;sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd_ui_access
| reverse
| streamstats global=f list(status) as last2Status window=2 by uri_path
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;use &lt;CODE&gt;list()&lt;/CODE&gt; with &lt;CODE&gt;global=f&lt;/CODE&gt; option.&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 01:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-last-two-http-status-for-every-subpage/m-p/463687#M130720</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-31T01:47:14Z</dc:date>
    </item>
  </channel>
</rss>

