<?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 the status wise data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576711#M200991</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Ahhh. You're right. I keep forgetting that and facepalm myself every so often &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Indeed, that's one of the cases where binning with time actually makes sense.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 08:11:19 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-11-30T08:11:19Z</dc:date>
    <item>
      <title>How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576693#M200979</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wrote below query which gives me data per service per min...&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;index=**** | bucket _time span=1m | convert ctime(_time) AS Hour timeformat="%H:%M" | stats count AS Requests by service, Hour&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Below is the screenshot for same&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_0-1638254814390.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17037iAEDC5A3BC813C28C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_0-1638254814390.png" alt="SG_0-1638254814390.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the requests i wanted to split based on HTTP status code (200, 404, 302, 500 etc). I am using below query for same but i am unabe to get the data.&lt;/P&gt;&lt;P&gt;index=*** | bucket _time span=1m | convert ctime(_time) AS Hour timeformat="%H:%M" | chart count AS Requests,status as HTTP_status by service, Hour&lt;/P&gt;&lt;P&gt;error screen shot -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_1-1638254934936.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17038i66804E3A8495CC65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_1-1638254934936.png" alt="SG_1-1638254934936.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help me how to get the number of requests by status code?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 06:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576693#M200979</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2021-11-30T06:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576697#M200981</link>
      <description>&lt;P&gt;First things first - you don't usually want to do bucketting and then stats by time because you have a specialized command for this - timechart&lt;/P&gt;&lt;P&gt;So your search may be rewritten simply as&lt;/P&gt;&lt;PRE&gt;index=***&lt;BR /&gt;| timechart span=1m count AS Requests status as HTTP_status by service&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Nov 2021 07:03:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576697#M200981</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-30T07:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576699#M200982</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;Above method also giving error as below..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_0-1638256025658.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17039i28D1D50D4EFFA0D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_0-1638256025658.png" alt="SG_0-1638256025658.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SG&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 07:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576699#M200982</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2021-11-30T07:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576701#M200983</link>
      <description>&lt;P&gt;Ahhh, right. Forgot about that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Transforming commands need some form of aggregation function to be applied to fields. So you can't just give a simple field name. You can have count(status) or dc(status) or any other statistical function. In your case, I suppose values(status) will do.&lt;/P&gt;&lt;P&gt;Or if you want to further break down your results by status move the status from the aggregation to the "by" clause&lt;/P&gt;&lt;PRE&gt;| timechart span=1m count by status service&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;EDIT: As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; already mentioned, this solution is wrong because of two separate dimension used for classifying events for stats. So we can either use manual binning and statsing or we have another solution - we can create an artificial combined dimension:&lt;/P&gt;&lt;PRE&gt;| eval servicestatus=service."-".status&lt;BR /&gt;| timechart span=1m count by servicestatus&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Nov 2021 08:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576701#M200983</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-30T08:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576702#M200984</link>
      <description>&lt;P&gt;chart (or timechart as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp; suggested) doesn't work with 4 dimensions (time, service, status and count). if you want just status then use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count AS Requests by HTTP_status, Hour&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 07:21:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576702#M200984</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-30T07:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576703#M200985</link>
      <description>&lt;P&gt;In this case i will not be able to bifurcate my stats service wise.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 07:25:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576703#M200985</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2021-11-30T07:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576705#M200987</link>
      <description>&lt;P&gt;Not with chart - you can use stats however&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by Hour service HTTP_status&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Nov 2021 07:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576705#M200987</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-30T07:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the status wise data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576711#M200991</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Ahhh. You're right. I keep forgetting that and facepalm myself every so often &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Indeed, that's one of the cases where binning with time actually makes sense.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 08:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-status-wise-data/m-p/576711#M200991</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-30T08:11:19Z</dc:date>
    </item>
  </channel>
</rss>

