<?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 Plotting duration on chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64365#M15930</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;I want to show time taken by a process to complete in seconds on time chart.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sample log entries&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 05:58:46.764   TM1.Process   Process "TI_1" executed by user "Admin"&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 05:58:55.796   TM1.Process   Process "TI_1":  finished executing normally, elapsed time 9.02 seconds&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:01:45.400   TM1.Process   Process "TI_1" executed by user "Admin"&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:01:55.243   TM1.Process   Process "TI_1":  finished executing normally, elapsed time 9.84 seconds&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:02:26.038   TM1.Process   Process "TI_1" executed by user "Admin"&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:02:28.627   TM1.Process   Process "TI_1":  finished executing normally, elapsed time 2.59 seconds&lt;/P&gt;

&lt;P&gt;Example values of duration from above log entries are 9.02 seconds and 9.84 seconds etc. We want plot these values on chart&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2013 13:18:46 GMT</pubDate>
    <dc:creator>ChhayaV</dc:creator>
    <dc:date>2013-09-16T13:18:46Z</dc:date>
    <item>
      <title>Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64365#M15930</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;I want to show time taken by a process to complete in seconds on time chart.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sample log entries&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 05:58:46.764   TM1.Process   Process "TI_1" executed by user "Admin"&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 05:58:55.796   TM1.Process   Process "TI_1":  finished executing normally, elapsed time 9.02 seconds&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:01:45.400   TM1.Process   Process "TI_1" executed by user "Admin"&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:01:55.243   TM1.Process   Process "TI_1":  finished executing normally, elapsed time 9.84 seconds&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:02:26.038   TM1.Process   Process "TI_1" executed by user "Admin"&lt;/P&gt;

&lt;P&gt;4432   [e0]   INFO   2013-04-18 06:02:28.627   TM1.Process   Process "TI_1":  finished executing normally, elapsed time 2.59 seconds&lt;/P&gt;

&lt;P&gt;Example values of duration from above log entries are 9.02 seconds and 9.84 seconds etc. We want plot these values on chart&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2013 13:18:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64365#M15930</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-16T13:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64366#M15931</link>
      <description>&lt;P&gt;Two ways to do this:&lt;/P&gt;

&lt;P&gt;Easiest way would be to just search for lines that contain the "elapsed time" value in it and chart those values.  You can extract the elapsed time with a regular expression:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;"finished executing normally" | rex field=_raw "elapsed time (?&amp;lt;myduration&amp;gt;.*\s)seconds " | chart avg(myduration)&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;If you have multiple process names, you could extract the process name into a field as well and add that into your chart:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;"finished executing normally" | rex field=_raw "Process (?&amp;lt;processName&amp;gt;\w+)" | rex field=_raw "elapsed time (?&lt;MYDURATION&gt;.*\s)seconds " | chart avg(myDuration) by processName&lt;/MYDURATION&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Of course, use "timechart" instead of "chart" if you want to see the distribution of durations over time.  Also. "timechart" does not require the use of a statistical function, but as Ayn points out if you have multiple events occuring during a given time slice on that you will still need to use a stat function.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Probably your best bet on this type of data is to use "table" instead of "chart" or "timechart".&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64366#M15931</guid>
      <dc:creator>zeroactive</dc:creator>
      <dc:date>2020-09-28T14:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64367#M15932</link>
      <description>&lt;P&gt;No, &lt;CODE&gt;chart&lt;/CODE&gt; needs a statistical function as an argument so you can't just give it a field straight away like that. Also I imagine the poster wants to plot these over time. You could achieve this by skipping the chart commands and using &lt;CODE&gt;| table _time myduration&lt;/CODE&gt; at the end.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2013 18:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64367#M15932</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-09-16T18:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64368#M15933</link>
      <description>&lt;P&gt;hi i am not able to match the process which are having name as "}Drill_Sales_Drill"&lt;/P&gt;

&lt;P&gt;I matched all the process which are like "TI_1"&lt;/P&gt;

&lt;P&gt;any suggestion?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:47:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64368#M15933</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2020-09-28T14:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64369#M15934</link>
      <description>&lt;P&gt;hi &lt;BR /&gt;
How can i show process names also | table table _time myduration working fine but i need to show process name also&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2013 10:16:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64369#M15934</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-17T10:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64370#M15935</link>
      <description>&lt;P&gt;i want to plot time taken by a particular process to complete on chart.if elapsed time is 0.03 seconds this means process took 3 seconds to complete that i want to show with process name.And is it necessary to use function with time chart can i not use something like timechart myduration by Processname?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2013 10:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64370#M15935</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-17T10:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64371#M15936</link>
      <description>&lt;P&gt;I insist on that you do need it. Otherwise timechart would have no idea of how to handle multiple values in a timeslice.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2013 14:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64371#M15936</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-09-17T14:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting duration on chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64372#M15937</link>
      <description>&lt;P&gt;ok so there is no way to plot a chart in a way i want?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2013 09:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plotting-duration-on-chart/m-p/64372#M15937</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-09-18T09:18:08Z</dc:date>
    </item>
  </channel>
</rss>

