<?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: query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676492#M231365</link>
    <description>&lt;LI-CODE lang="markup"&gt;| stats avg(timetaken) count(eval(httpsCode == 200)) as success count(eval(httpsCode != 200)) as failure&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 04 Feb 2024 09:53:30 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-02-04T09:53:30Z</dc:date>
    <item>
      <title>How to summarize HTTP request logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676490#M231364</link>
      <description>&lt;P&gt;I have a requirement where I need to fetch the success, failure count and average response time. In events field I have entry like httpsCode and timetaken. where timetaken returns values like 628, 484 etc.... the case is like httpscode is 200 it should be treated as success count and others should be treated as failure count.... finally the statistics table should show values of success,failure and average response time....&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 12:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676490#M231364</guid>
      <dc:creator>sahana</dc:creator>
      <dc:date>2024-02-04T12:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676492#M231365</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats avg(timetaken) count(eval(httpsCode == 200)) as success count(eval(httpsCode != 200)) as failure&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 04 Feb 2024 09:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676492#M231365</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-04T09:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676494#M231366</link>
      <description>&lt;P&gt;i have around 25&amp;nbsp; events with&amp;nbsp; httpsCode = 200 OK but when use the above function it returns 0 in the success column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 11:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676494#M231366</guid>
      <dc:creator>sahana</dc:creator>
      <dc:date>2024-02-04T11:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676501#M231371</link>
      <description>&lt;P&gt;Has httpsCode been extracted OK? Please share some sample event, anonymised of course.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 15:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676501#M231371</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-04T15:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676508#M231373</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;suggested, you should check and post accuracy of relevant data. &amp;nbsp;I highly doubt if you have a field called httpsCode. &amp;nbsp;It is more likely httpCode, if the field is provided by Splunk at all. &amp;nbsp;If it not already extracted, you need to first extract it. &amp;nbsp;If you need help with extraction, you will need to post raw data (anonymize as needed).&lt;/P&gt;&lt;P&gt;More than that, a good, answerable question should illustrate desired results and explain the logic between illustrated dataset and desired results. &amp;nbsp;This relieves volunteers of the burden to read your mind. &amp;nbsp;Statistically, mind reading is more wrong than correct.&lt;/P&gt;&lt;P&gt;This said, I interpret your intention as to discern the count and average timetaken - again, if this field is named such and already extracted in Splunk, &lt;U&gt;by "&lt;EM&gt;success&lt;/EM&gt;" or "&lt;EM&gt;failure&lt;/EM&gt;" status&lt;/U&gt;. &amp;nbsp;Maybe this will help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval status = if(match(httpCode, "200|30[0-4,78]"), "success", "failure")
| stats avg(timetaken) count by status&lt;/LI-CODE&gt;&lt;P&gt;Note that 3xx return codes are generally success statuses. &amp;nbsp;Unless you have specific reasons to classify them as "failure", they should be grouped into success.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 20:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676508#M231373</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-02-04T20:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676827#M231462</link>
      <description>&lt;P&gt;Thanks for the info shared able to fetch the results.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another&amp;nbsp;requirement like, I want to show an bar chart which should show the total login count in basis of the time period we submit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example if we select 2 days it should show the bar chart where y is for login count and x is for time slection (in basis of day interval like 6thfeb&amp;nbsp; 7th feb like this)&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 11:04:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-summarize-HTTP-request-logs/m-p/676827#M231462</guid>
      <dc:creator>sahana</dc:creator>
      <dc:date>2024-02-07T11:04:12Z</dc:date>
    </item>
  </channel>
</rss>

