<?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 Get the details events after using stats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563042#M196164</link>
    <description>&lt;P class="lia-align-left"&gt;I have a query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = "index1"
|spath output=error_code input=RAW_DATA path=MsgSts.Cd
|dedup SESSIONID
|stats count as Total sum(eval(if error_code=2,1,0))) as Error by OPERATION
|eval Rate = round ((Error/Total)*100,2)
|search Rate&amp;gt;20
|table OPPERAION Rate Error&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the table is&lt;/P&gt;&lt;P&gt;OPERATION | Rate&amp;nbsp;&amp;nbsp; | Error&lt;/P&gt;&lt;P&gt;VerifyOTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 24.08 | 310&lt;/P&gt;&lt;P&gt;Which is what I want because I want to know which OPERATION have more than 20% error rate in a certain time range.&lt;BR /&gt;But now the hard part, is I want an alert to send to my email the details of all 310 errors event that show above. Since I use stats command, the only information I got left is Total, Error, Rate and OPERATION.&lt;/P&gt;&lt;P&gt;How do I get the detail events when the rate hit &amp;gt;20% according to my search ?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 09:37:34 GMT</pubDate>
    <dc:creator>phamxuantung</dc:creator>
    <dc:date>2021-08-12T09:37:34Z</dc:date>
    <item>
      <title>Get the details events after using stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563042#M196164</link>
      <description>&lt;P class="lia-align-left"&gt;I have a query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = "index1"
|spath output=error_code input=RAW_DATA path=MsgSts.Cd
|dedup SESSIONID
|stats count as Total sum(eval(if error_code=2,1,0))) as Error by OPERATION
|eval Rate = round ((Error/Total)*100,2)
|search Rate&amp;gt;20
|table OPPERAION Rate Error&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the table is&lt;/P&gt;&lt;P&gt;OPERATION | Rate&amp;nbsp;&amp;nbsp; | Error&lt;/P&gt;&lt;P&gt;VerifyOTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 24.08 | 310&lt;/P&gt;&lt;P&gt;Which is what I want because I want to know which OPERATION have more than 20% error rate in a certain time range.&lt;BR /&gt;But now the hard part, is I want an alert to send to my email the details of all 310 errors event that show above. Since I use stats command, the only information I got left is Total, Error, Rate and OPERATION.&lt;/P&gt;&lt;P&gt;How do I get the detail events when the rate hit &amp;gt;20% according to my search ?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 09:37:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563042#M196164</guid>
      <dc:creator>phamxuantung</dc:creator>
      <dc:date>2021-08-12T09:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get the details events after using stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563046#M196167</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;can you try to uses values(filed1) ... values(fieldN) on your stats? It shows those all different values which fields contain as mv field. Probably not exactly what you are looking, but maybe enough?&lt;/P&gt;&lt;P&gt;If this is not what you want then you could try to use require-command to check if this query gives answer and then add those events?&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/SearchReference/Require" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/SearchReference/Require&lt;/A&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 09:51:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563046#M196167</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-08-12T09:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get the details events after using stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563047#M196168</link>
      <description>&lt;P&gt;Use eventstats&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = "index1"
|spath output=error_code input=RAW_DATA path=MsgSts.Cd
|dedup SESSIONID
|eventstats count as Total sum(eval(if error_code=2,1,0))) as Error by OPERATION
|eval Rate = round ((Error/Total)*100,2)
|search Rate&amp;gt;20&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Aug 2021 09:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-the-details-events-after-using-stats/m-p/563047#M196168</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-12T09:52:14Z</dc:date>
    </item>
  </channel>
</rss>

