<?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 calculate the Average of the Time coming in sec in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553788#M38441</link>
    <description>&lt;P&gt;Seconds (inferred from the "secs" in the data)&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 06:37:28 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-06-01T06:37:28Z</dc:date>
    <item>
      <title>How to calculate the Average of the Time coming in sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553775#M38437</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I am getting&lt;STRONG&gt; total time taken&lt;/STRONG&gt; field as shown below in my logs&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;on_1621717537363_2611781&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="t"&gt;3497&lt;/SPAN&gt; &lt;SPAN class="t"&gt;secs&lt;/SPAN&gt;,&lt;/STRONG&gt;&lt;SPAN class="t"&gt;Passed&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN class="t"&gt;E3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;621717537363_2611790&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;926 secs&lt;/STRONG&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;Passed&lt;SPAN&gt;,,&lt;/SPAN&gt;E3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;I want to calculate its Average. I tried with this query but its not working:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;index=abc source="/xyz"|eval fields=split(_raw,",")|eval job_id=mvindex(fields,0)|eval sourceType=mvindex(fields,1)|eval inputFilePath=mvindex(fields,2)|eval tableName=mvindex(fields,3)|eval inputRecordsCount=mvindex(fields,4)|eval processedRecordsCount=mvindex(fields,5)|eval startTime=mvindex(fields,6)|eval endTime=mvindex(fields,7)|eval loadAppendTimestampCol=mvindex(fields,8)|eval refreshType=mvindex(fields,9)|eval className=mvindex(fields,10)|eval applicationId=mvindex(fields,11)|eval totalTimeTaken=mvindex(fields,12)|eval status=mvindex(fields,13)|eval errorMessage=mvindex(fields,14)|eval Environment=mvindex(fields,15)|&lt;STRONG&gt;stats avg(totalTimeTaken) as AvgExecTime |eval AvgExecTime=round(AvgExecTime,2)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;STRONG&gt;Can someone guide me on this.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 05:46:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553775#M38437</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-06-01T05:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the Average of the Time coming in sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553778#M38438</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;this should work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw = "
on_1621717537363_2611781,3497 secs,Passed,,E3
621717537363_2611790,926 secs,Passed,,E3"
| multikv noheader=t
 ```above generates sample data```
| rex ",(?&amp;lt;secs&amp;gt;\d+) secs,"
| stats avg(secs) as AvgExecTime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;r. Ismo&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 06:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553778#M38438</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-06-01T06:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the Average of the Time coming in sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553781#M38439</link>
      <description>&lt;P&gt;Add this after the mvindex line for totalTimeTaken&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=totalTimeTaken "(?&amp;lt;totalTimeTaken&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Jun 2021 06:15:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553781#M38439</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-01T06:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the Average of the Time coming in sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553786#M38440</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will give me average in seconds or in minutes?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 06:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553786#M38440</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-06-01T06:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the Average of the Time coming in sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553788#M38441</link>
      <description>&lt;P&gt;Seconds (inferred from the "secs" in the data)&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 06:37:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553788#M38441</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-01T06:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the Average of the Time coming in sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553794#M38443</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why its not working with Timechart when I am using below query:&lt;/P&gt;&lt;P&gt;index=abc source="xyz"|eval fields=split(_raw,",")|eval job_id=mvindex(fields,0)|eval sourceType=mvindex(fields,1)|eval inputFilePath=mvindex(fields,2)|eval tableName=mvindex(fields,3)|eval inputRecordsCount=mvindex(fields,4)|eval processedRecordsCount=mvindex(fields,5)|eval startTime=mvindex(fields,6)|eval endTime=mvindex(fields,7)|eval loadAppendTimestampCol=mvindex(fields,8)|eval refreshType=mvindex(fields,9)|eval className=mvindex(fields,10)|eval applicationId=mvindex(fields,11)|&lt;STRONG&gt;eval totalTimeTaken=mvindex(fields,12)|rex field=totalTimeTaken "(?&amp;lt;totalTimeTaken&amp;gt;\d+)"&lt;/STRONG&gt;|eval status=mvindex(fields,13)|eval errorMessage=mvindex(fields,14)|eval Environment=mvindex(fields,15)|where Environment ="E3"|dedup job_id startTime endTime totalTimeTaken|&lt;STRONG&gt;timechart sum(totalTimeTaken) as TotalExecTime by job_id |eval TotalExecTime=round(TotalExecTime,2)|sort -TotalExecTime limit=10&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 06:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-calculate-the-Average-of-the-Time-coming-in-sec/m-p/553794#M38443</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-06-01T06:55:09Z</dc:date>
    </item>
  </channel>
</rss>

