<?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: Search average for time-taken field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430604#M123101</link>
    <description>&lt;P&gt;Hi rslama,&lt;BR /&gt;
This works perfectly! Thank you so much for the help.  You guys are awesome!!!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 17:18:50 GMT</pubDate>
    <dc:creator>salles</dc:creator>
    <dc:date>2019-06-21T17:18:50Z</dc:date>
    <item>
      <title>Search average for time-taken field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430602#M123099</link>
      <description>&lt;P&gt;Hi, I have a log file that has a field called "TimeTaken".&lt;BR /&gt;&lt;BR /&gt;
The values of this field are in the format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;00:01:27.763
00:02:10.15
00:01:36.175
00:00:48.368
00:00:22.692
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc..&lt;BR /&gt;
This signifies how long this operation took in HH:MM;SS;ms format (per each log line).&lt;BR /&gt;&lt;BR /&gt;
I am trying to figure out a way to do calculations on this field, for example, get an Average "timetaken" or how many events took longer than 00:12:00:00 (12 minutes) etc.&lt;BR /&gt;&lt;BR /&gt;
Is there any way this can be done using a clever Splunk search?&lt;BR /&gt;&lt;BR /&gt;
Any help would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 21:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430602#M123099</guid>
      <dc:creator>salles</dc:creator>
      <dc:date>2019-06-20T21:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Search average for time-taken field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430603#M123100</link>
      <description>&lt;P&gt;I think it will be easier if you converted to seconds, then do your average from there...&lt;BR /&gt;
*adding /60&lt;/P&gt;

&lt;P&gt;| eval Hr=(mvindex(split(TimeTaken,":"),0)) &lt;BR /&gt;
| eval Hr=Hr*60*60&lt;BR /&gt;
| eval Mn=(mvindex(split(TimeTaken,":"),1))&lt;BR /&gt;
| eval Mn=Mn*60&lt;BR /&gt;
| eval Sc=mvindex(split(TimeTaken,":"),2) &lt;BR /&gt;
| eval &lt;STRONG&gt;newTime&lt;/STRONG&gt;=(Hr+Mn+Sc)&lt;STRONG&gt;/60&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430603#M123100</guid>
      <dc:creator>rslama</dc:creator>
      <dc:date>2020-09-30T01:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search average for time-taken field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430604#M123101</link>
      <description>&lt;P&gt;Hi rslama,&lt;BR /&gt;
This works perfectly! Thank you so much for the help.  You guys are awesome!!!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 17:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430604#M123101</guid>
      <dc:creator>salles</dc:creator>
      <dc:date>2019-06-21T17:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Search average for time-taken field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430605#M123102</link>
      <description>&lt;P&gt;glad I was able to help!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 18:22:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-average-for-time-taken-field/m-p/430605#M123102</guid>
      <dc:creator>rslama</dc:creator>
      <dc:date>2019-06-21T18:22:49Z</dc:date>
    </item>
  </channel>
</rss>

