<?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: Plot Values by Time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455996#M128915</link>
    <description>&lt;P&gt;Hey Lavster,&lt;/P&gt;

&lt;P&gt;I've recreated what I think your dataset might look like in Splunk with the search below. Let me know if it isn't correct:&lt;BR /&gt;
(you can copy paste this directly into Splunk)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=6/1/19 end=6/30/19 increment=1d 
| eval seconds = random()%7 + 3 
| eval milliseconds = random()%60 
| eval milliseconds = if(len(milliseconds) = 1, "0".milliseconds, milliseconds) 
| eval elapsed = "00:3".seconds.":".milliseconds
| eval _time = starttime
| table _time elapsed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Assuming that it looks correct, you can use this search to convert the time into seconds, which will allow you to plot the values in a chart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...BASE SEARCH...
| table _time elapsed
| rex field=elapsed "(?&amp;lt;minutes&amp;gt;\d{2})\:(?&amp;lt;seconds&amp;gt;\d{2})\:(?&amp;lt;milliseconds&amp;gt;\d+)"
| eval minutes = minutes * 60, milliseconds = milliseconds / 100
| eval elapsed = minutes + seconds + milliseconds
| chart values(elapsed) OVER _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if you run into any trouble!&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2019 23:27:06 GMT</pubDate>
    <dc:creator>rbechtold</dc:creator>
    <dc:date>2019-07-03T23:27:06Z</dc:date>
    <item>
      <title>Plot Values by Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455994#M128913</link>
      <description>&lt;P&gt;Hello, im having trouble getting timechart by value to give me any results. I have a data set that has a value for each day, so far 30 days worth of data, each "Elapsed Time" is anywhere from 33 - 40 seconds, showing 00:33:56 etc etc however when i timechart this i dont get any errors but i also dont get any results. i dont want an average or count but the exact value, is this possible?&lt;/P&gt;

&lt;P&gt;i've tried |timechart value(elapsed) , | timechart dc(elapsed) | timechart values(elapsed) span=1d | chart values(elapsed) by _time.&lt;/P&gt;

&lt;P&gt;any help would be appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 17:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455994#M128913</guid>
      <dc:creator>lavster</dc:creator>
      <dc:date>2019-07-03T17:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Plot Values by Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455995#M128914</link>
      <description>&lt;P&gt;can you post your full query and a sample data set&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 19:13:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455995#M128914</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2019-07-03T19:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Plot Values by Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455996#M128915</link>
      <description>&lt;P&gt;Hey Lavster,&lt;/P&gt;

&lt;P&gt;I've recreated what I think your dataset might look like in Splunk with the search below. Let me know if it isn't correct:&lt;BR /&gt;
(you can copy paste this directly into Splunk)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=6/1/19 end=6/30/19 increment=1d 
| eval seconds = random()%7 + 3 
| eval milliseconds = random()%60 
| eval milliseconds = if(len(milliseconds) = 1, "0".milliseconds, milliseconds) 
| eval elapsed = "00:3".seconds.":".milliseconds
| eval _time = starttime
| table _time elapsed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Assuming that it looks correct, you can use this search to convert the time into seconds, which will allow you to plot the values in a chart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...BASE SEARCH...
| table _time elapsed
| rex field=elapsed "(?&amp;lt;minutes&amp;gt;\d{2})\:(?&amp;lt;seconds&amp;gt;\d{2})\:(?&amp;lt;milliseconds&amp;gt;\d+)"
| eval minutes = minutes * 60, milliseconds = milliseconds / 100
| eval elapsed = minutes + seconds + milliseconds
| chart values(elapsed) OVER _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if you run into any trouble!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 23:27:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455996#M128915</guid>
      <dc:creator>rbechtold</dc:creator>
      <dc:date>2019-07-03T23:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Plot Values by Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455997#M128916</link>
      <description>&lt;P&gt;When using &lt;CODE&gt;timechart&lt;/CODE&gt;, the field used as the argument to the aggregation function (e.g. &lt;CODE&gt;avg()&lt;/CODE&gt;) must contain only numbers.  In your case, it does not, so change that like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval | convert dur2sec(elapsed) AS elapsed_seconds | timechart avg(elapsed_seconds) span=1d
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jul 2019 00:27:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455997#M128916</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-04T00:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Plot Values by Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455998#M128917</link>
      <description>&lt;P&gt;Thanks for this, worked a charm&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 06:13:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plot-Values-by-Time/m-p/455998#M128917</guid>
      <dc:creator>lavster</dc:creator>
      <dc:date>2019-07-04T06:13:07Z</dc:date>
    </item>
  </channel>
</rss>

