<?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: aggregation over _time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/aggregation-over-time/m-p/384930#M172149</link>
    <description>&lt;P&gt;Try this (Splunk generally give result in reverse chronological order, so you may not need that sort command)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mlbso sourcetype=BWP_hanatraces "long running cursor detected"  
 | table _time CONNECTION_ID CONNECTION_STATUS IDLE_TIME HOST
 | rex field=IDLE_TIME "(?&amp;lt;idletime&amp;gt;\d+) sec" 
 | eventstats max(idletime) as MAX_IDLE_TIME 
 | eval MAX_IDLE_TIME =tostring(MAX_IDLE_TIME ,"duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Mar 2019 16:13:21 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2019-03-29T16:13:21Z</dc:date>
    <item>
      <title>aggregation over _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/aggregation-over-time/m-p/384929#M172148</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mlbso sourcetype=BWP_hanatraces "long running cursor detected"  | sort - _time
| table _time CONNECTION_ID CONNECTION_STATUS IDLE_TIME HOST
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It gives the following output:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6802i2484A64CDE50479F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;    &lt;/P&gt;

&lt;P&gt;I would like to create a variable that would correspond to max IDLE_TIME, so e.g. on the example above 26058.  Then it would be good to have it in the h:mm format, meaning 1:16 (h:mm).&lt;/P&gt;

&lt;P&gt;How would I achieve this?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:44:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/aggregation-over-time/m-p/384929#M172148</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-03-29T15:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: aggregation over _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/aggregation-over-time/m-p/384930#M172149</link>
      <description>&lt;P&gt;Try this (Splunk generally give result in reverse chronological order, so you may not need that sort command)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mlbso sourcetype=BWP_hanatraces "long running cursor detected"  
 | table _time CONNECTION_ID CONNECTION_STATUS IDLE_TIME HOST
 | rex field=IDLE_TIME "(?&amp;lt;idletime&amp;gt;\d+) sec" 
 | eventstats max(idletime) as MAX_IDLE_TIME 
 | eval MAX_IDLE_TIME =tostring(MAX_IDLE_TIME ,"duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/aggregation-over-time/m-p/384930#M172149</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-29T16:13:21Z</dc:date>
    </item>
  </channel>
</rss>

