<?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: Help tracking average completion time of a process in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496763#M138408</link>
    <description>&lt;P&gt;as a fun note, you can use &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Aggregatefunctions#range.28X.29"&gt;range&lt;/A&gt; to calculate duration. It will not format it, but in a chart, you will need it as a number, not a string.&lt;/P&gt;

&lt;P&gt;you also mention you want this by date, which I don't see in the query provided.&lt;/P&gt;

&lt;P&gt;something to get you started might be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=rpa
|stats range(_time) as duration max(_time) as _time by sessionId
|eval duration_min=round(duration/60,2)
|timechart avg(duration_min) as avg_duration_min by sessionId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 02 Oct 2019 00:51:35 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2019-10-02T00:51:35Z</dc:date>
    <item>
      <title>Help tracking average completion time of a process in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496762#M138407</link>
      <description>&lt;P&gt;Below I have sample data from a process that Blue Prism outputs during each event in a process.  I am trying to create a time chart that tracks how long it takes each process to run.  What I need is some sort of chart that has different colored lines for each process.  However, I cannot quite get that to work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   currprocessid: a2672568-5faf-4ebe-a3d8-d16542fb7a96
   currprocessname: Auto Payoff
   currprocesstype: 0
   eventId: endProcess
   mainprocessid: a2672568-5faf-4ebe-a3d8-d16542fb7a96
   mainprocessname: Auto Payoff
   pageid: 00000000-0000-0000-0000-000000000000
   pagename: Main Page
   resourceName: computer1
   sessionNumber: 110995
   sessionid: 8dce2381-0db4-4e69-a15e-0b84091ee489
   stageid: 47648a05-b3e4-452d-a374-c6f156abc86c
   stagename: End2
   when: 2019-10-01T11:56:56.1005506Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the search I have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="rpa"  | stats earliest(_time) AS earliest latest(_time) AS latest BY sessionid  | eval duration = tostring((latest-earliest), "duration")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is obviously not correct as it's not populating the data properly.&lt;/P&gt;

&lt;P&gt;The Y-axis would have the time in minutes, while the X-axis would be by date.  The lines in the graph would be by the average sessionid completion time by mainprocessname.&lt;/P&gt;

&lt;P&gt;I hope this makes sense.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 19:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496762#M138407</guid>
      <dc:creator>mateofrito</dc:creator>
      <dc:date>2019-10-01T19:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help tracking average completion time of a process in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496763#M138408</link>
      <description>&lt;P&gt;as a fun note, you can use &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Aggregatefunctions#range.28X.29"&gt;range&lt;/A&gt; to calculate duration. It will not format it, but in a chart, you will need it as a number, not a string.&lt;/P&gt;

&lt;P&gt;you also mention you want this by date, which I don't see in the query provided.&lt;/P&gt;

&lt;P&gt;something to get you started might be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=rpa
|stats range(_time) as duration max(_time) as _time by sessionId
|eval duration_min=round(duration/60,2)
|timechart avg(duration_min) as avg_duration_min by sessionId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Oct 2019 00:51:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496763#M138408</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2019-10-02T00:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help tracking average completion time of a process in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496764#M138409</link>
      <description>&lt;P&gt;Thank you, I’ll give this a try tomorrow.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 02:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-tracking-average-completion-time-of-a-process-in-Splunk/m-p/496764#M138409</guid>
      <dc:creator>mateofrito</dc:creator>
      <dc:date>2019-10-02T02:02:46Z</dc:date>
    </item>
  </channel>
</rss>

