<?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 time of the event when finding maximum event count that has happened  in a minute over a time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651383#M225199</link>
    <description>&lt;LI-CODE lang="markup"&gt;index="xxx" "headers.a"="abc"  | rename "status.operation_path" as PATH | bucket _time span=1m | stats count by PATH  _time | eventstats max(count) as max by PATH | stats first(eval(if(count=max,_time,null()))) as _time max(max) as max by PATH&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 20 Jul 2023 22:08:42 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-07-20T22:08:42Z</dc:date>
    <item>
      <title>How to get the time of the event when finding maximum event count that has happened  in a minute over a time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651381#M225198</link>
      <description>&lt;P&gt;I have a query to find the&amp;nbsp;maximum event count that has happened in a minute over time as below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="xxx" "headers.a"="abc"  | rename "status.operation_path" as PATH | bucket _time span=1m | stats count by PATH  _time | stats max(count) by PATH &lt;/LI-CODE&gt;&lt;P&gt;The above query displays the maximum event count in a minute VS PATH.&amp;nbsp; I also need to display the time when this maximum event count happened for each path.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 21:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651381#M225198</guid>
      <dc:creator>RemyaT</dc:creator>
      <dc:date>2023-07-20T21:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the time of the event when finding maximum event count that has happened  in a minute over a time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651383#M225199</link>
      <description>&lt;LI-CODE lang="markup"&gt;index="xxx" "headers.a"="abc"  | rename "status.operation_path" as PATH | bucket _time span=1m | stats count by PATH  _time | eventstats max(count) as max by PATH | stats first(eval(if(count=max,_time,null()))) as _time max(max) as max by PATH&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 20 Jul 2023 22:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651383#M225199</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-20T22:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the time of the event when finding maximum event count that has happened  in a minute over a time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651384#M225200</link>
      <description>&lt;P&gt;I adjusted your search to use the _internal index, you should be able to adjust the SPL to suit your use case.&lt;/P&gt;&lt;P&gt;This is where I would use eventstats to create a new field on each even that had the max value, and then filter to just those. And if you have two time buckets that have the same, grab just the latest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index=_internal &lt;BR /&gt;| bucket _time span=1m &lt;BR /&gt;| stats count by sourcetype _time &lt;BR /&gt;| eventstats max(count) as maxcount by sourcetype ```Get the max count for all buckets by sourcetype```&lt;BR /&gt;| where maxcount=count ```Filter down to where the maxcount is the count```&lt;BR /&gt;| stats latest(_time) AS _time, latest(count) by sourcetype ```Get just the latest time for that sourcetype, and the count```&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jul 2023 22:13:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-time-of-the-event-when-finding-maximum-event/m-p/651384#M225200</guid>
      <dc:creator>lshatzer</dc:creator>
      <dc:date>2023-07-20T22:13:10Z</dc:date>
    </item>
  </channel>
</rss>

