<?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: Timechart to start from the most recent time where a condition is met in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302094#M163740</link>
    <description>&lt;P&gt;You can use "my search earliest=-h | timechart avg(Throughput) span=5m by id"&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2018 10:37:57 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2018-01-11T10:37:57Z</dc:date>
    <item>
      <title>Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302093#M163739</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;

&lt;P&gt;I have "my search | timechart avg(Throughput) span=5m by id".&lt;/P&gt;

&lt;P&gt;For each id, the throughput fluctuates and and drop to 0 several times. I want to show the user the throughput from the most recent time + 1hour earlier. I do not need to show the older events where Throughput=0.&lt;/P&gt;

&lt;P&gt;Thank you in advance for your suggestions.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302093#M163739</guid>
      <dc:creator>sssignals</dc:creator>
      <dc:date>2018-01-11T10:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302094#M163740</link>
      <description>&lt;P&gt;You can use "my search earliest=-h | timechart avg(Throughput) span=5m by id"&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:37:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302094#M163740</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-11T10:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302095#M163741</link>
      <description>&lt;P&gt;You can try something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; my search | bucket span=5m _time | stats avg(Throughput) as Throughput by _time id| where Throughput!=0 | xyseries _time,id,Throughput | sort- _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302095#M163741</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-11T10:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302096#M163742</link>
      <description>&lt;P&gt;Thanks mayurr98  for your suggestion. Tried but did not get the expected results.&lt;/P&gt;

&lt;P&gt;For example, I am looking at 1 id only. The throughput for this 1 id fluctuates and drops to zero a few times over say a week, after which it will rise and fluctuate at a non-zero value. The most recent event that the throughput of this id drop to zero was eg. yesterday 4pm. &lt;/P&gt;

&lt;P&gt;So I want to show my users the throughout for this id from the most recent event (where throughput drops to zero) in a timechart starting from yesterday 3pm and time range for 12hrs. &lt;/P&gt;

&lt;P&gt;Thanks for your thoughts and suggestions on my problem in advance. &lt;BR /&gt;
I really appreciate it!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 07:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302096#M163742</guid>
      <dc:creator>sssignals</dc:creator>
      <dc:date>2018-01-12T07:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302097#M163743</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search
| bin span=5min _time
| stats avg(Throughput) AS Throughput span=5m by id _time
| eval zero_throughput_time=if(Throughput=0, _time, NULL)
| eventstats latest(zero_throughput_time) AS latest_zero_throughput_time BY id
| eval latest_zero_throughput_time=if(isnull(latest_zero_throughput_time), 0, latest_zero_throughput_time)
| where _time&amp;gt;=latest_zero_throughput_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Jan 2018 06:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302097#M163743</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-13T06:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302098#M163744</link>
      <description>&lt;P&gt;Following your comment try this: first try for particular &lt;CODE&gt;id&lt;/CODE&gt; and check the results and then do this for all&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt; id=&amp;lt;your_id&amp;gt; | bucket span=5m _time 
 | stats avg(Throughput) AS Throughput by id _time  | eval Throughput=round(Throughput)   | eval zero_throughput_time=case(Throughput=0, _time) | eventstats latest(zero_throughput_time) AS latest_zero_throughput_time BY id| eval latest_zero_throughput_time=if(isnull(latest_zero_throughput_time), 0, latest_zero_throughput_time)  | where   _time&amp;lt;=latest_zero_throughput_time+39600  | where _time&amp;gt;=latest_zero_throughput_time-3600 |where Throughput!=0 | chart values(Throughput) over _time by id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this helps you!&lt;/P&gt;

&lt;P&gt;Also you can try running above query in parts so that you can see what is happening after each &lt;CODE&gt;|&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2018 07:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302098#M163744</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-13T07:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302099#M163745</link>
      <description>&lt;P&gt;by the way you can not run  &lt;CODE&gt;| eval zero_throughput_time=if(Throughput=0, _time, NULL)&lt;/CODE&gt; as there is no field generated &lt;CODE&gt;Throughput&lt;/CODE&gt; by &lt;CODE&gt;| timechart avg(Throughput) AS Throughput span=5m by id&lt;/CODE&gt; command. &lt;/P&gt;

&lt;P&gt;I hope you understand what I am trying to say!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2018 07:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302099#M163745</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-13T07:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart to start from the most recent time where a condition is met</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302100#M163746</link>
      <description>&lt;P&gt;You're right.  I edited my search to use &lt;CODE&gt;bin&lt;/CODE&gt; and &lt;CODE&gt;stats&lt;/CODE&gt; instead.  That's what I get for trying to type out a search without actually running it like I usually do.&lt;/P&gt;

&lt;P&gt;Good catch!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2018 15:49:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-to-start-from-the-most-recent-time-where-a-condition/m-p/302100#M163746</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-13T15:49:23Z</dc:date>
    </item>
  </channel>
</rss>

