<?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: Adding Outputs of a Search to Timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197762#M57165</link>
    <description>&lt;P&gt;Sorry for the confusion.  So what I am doing here is calculating duration of orders from today that are greater than the avg duration of orders from last week.  So I am trying to add 'duration' and 'prev_week_avg_duration' to a line graph via timechart.  Please let me know if that helps. Thank you&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:50:57 GMT</pubDate>
    <dc:creator>_gkollias</dc:creator>
    <dc:date>2020-09-28T16:50:57Z</dc:date>
    <item>
      <title>Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197760#M57163</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'd like to add duration and last weeks avg duration values in to timechart to help display time better, however I'm not getting accurate results with what I have.  Here is the search without timechart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=contract_gateway sourcetype=esb_audit  earliest=@d bp_bp_name=PO 
| stats first(svc_context_name) as svc_context_name, earliest(_time) as _time, latest(_time) as end_time, latest(status) as status, by svc_context_id, bp_context_id 
| eval duration=(end_time-_time)  
| join svc_context_name type=left  [ search index=contract_gateway_summary source=contract_process_summary earliest=-7d@d latest=-6d@d bp_bp_name=PO  
      | stats avg(duration) as prev_week_avg_duration by svc_context_name]  
| where duration&amp;gt;(2*prev_week_avg_duration)  
|  bucket span=10m _time | table _time, duration, prev_week_avg_duration | sort - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Increasing bucket span doesn't help either.  I know there needs to be something like &lt;BR /&gt;
...&lt;CODE&gt;| timechart span=10m max(duration) as current_duration, min(duration) as prev_week_avg_duration,&lt;/CODE&gt; but this isn't working.&lt;/P&gt;

&lt;P&gt;Any suggestions would be greatly appreciated&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 20:43:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197760#M57163</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-06-12T20:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197761#M57164</link>
      <description>&lt;P&gt;I tried to figure out an answer to this, but I got very confused about what you actually want to see on the timechart.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 20:52:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197761#M57164</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-06-12T20:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197762#M57165</link>
      <description>&lt;P&gt;Sorry for the confusion.  So what I am doing here is calculating duration of orders from today that are greater than the avg duration of orders from last week.  So I am trying to add 'duration' and 'prev_week_avg_duration' to a line graph via timechart.  Please let me know if that helps. Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:50:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197762#M57165</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2020-09-28T16:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197763#M57166</link>
      <description>&lt;P&gt;You can't have that many variables on a timechart - you only have 3 to work with:&lt;/P&gt;

&lt;P&gt;X axis - time&lt;BR /&gt;
Y axis - duration (in seconds, I suppose)&lt;BR /&gt;
multiple lines based on a third variable - which one?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2014 00:08:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197763#M57166</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-06-13T00:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197764#M57167</link>
      <description>&lt;P&gt;There are only two variables, and that is the duration and prev_week_avg_duration.  Time is automatically added by the timechart.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197764#M57167</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2020-09-28T16:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197765#M57168</link>
      <description>&lt;P&gt;This is as close as I can get with the information you have provided....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=contract_gateway sourcetype=esb_audit  earliest=@d bp_bp_name=PO
| stats first(svc_context_name) as svc_context_name, range(_time) as current_duration, earliest(_time) as timestamp, latest(status) as status, by svc_context_id, bp_context_id 
| bucket timestamp span=10m
| stats avg(current_duration) as current_duration by timestamp svc_context_name
| join svc_context_name type=left [ search index=contract_gateway_summary source=contract_process_summary earliest=-7d@d latest=-6d@d bp_bp_name=PO  
      | stats avg(duration) as prev_week_avg_duration by svc_context_name ]  
| table svc_context_name timestamp current_duration prev_week_avg_duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Jun 2014 00:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197765#M57168</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-06-13T00:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Outputs of a Search to Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197766#M57169</link>
      <description>&lt;P&gt;Sorry, I really appreciate the help,  but this also doesn't work.  The actual durations are off...there has to be a way! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2014 00:21:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Outputs-of-a-Search-to-Timechart/m-p/197766#M57169</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-06-13T00:21:00Z</dc:date>
    </item>
  </channel>
</rss>

