<?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: How can I reset the &amp;quot;search timeframe&amp;quot; based on data in results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362873#M107207</link>
    <description>&lt;P&gt;I am dependent on time data, but the time data isn't in the timeframe of the original query. The timeframe of the original query isn't relevant.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 21:02:16 GMT</pubDate>
    <dc:creator>vbumgarner</dc:creator>
    <dc:date>2017-06-23T21:02:16Z</dc:date>
    <item>
      <title>How can I reset the "search timeframe" based on data in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362871#M107205</link>
      <description>&lt;P&gt;Is there any way to "reset" the "search timeframe" so that all the "commands that bin" will honor a new "search timeframe" instead of the timeframe used in the original query?&lt;/P&gt;

&lt;P&gt;Background:&lt;BR /&gt;
I have some data where _time doesn't mean anything useful, and I reset _time in the query itself. timechart/bin/sparkline seem to doggedly pay attention to the timeframe from the original query. Is there any way in the query to "reset" what "earliest" and "latest" are, using eventstats or similar, so that downstream commands use the calculated timeframe?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 17:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362871#M107205</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2017-06-23T17:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reset the "search timeframe" based on data in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362872#M107206</link>
      <description>&lt;P&gt;If your sparkline are not dependent on timeseries data, you can use &lt;STRONG&gt;Pie sparkline&lt;/STRONG&gt; instead (or bullet or box-plot).&lt;/P&gt;

&lt;P&gt;Refer to my answers for other options available with sparklines: &lt;A href="https://answers.splunk.com/answers/474127/pie-chart-sparkline-to-see-filling-ratio-of-splunk.html"&gt;https://answers.splunk.com/answers/474127/pie-chart-sparkline-to-see-filling-ratio-of-splunk.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;PS: As informed, officially supported sparkline visualizations are only &lt;STRONG&gt;line&lt;/STRONG&gt;, &lt;STRONG&gt;bar&lt;/STRONG&gt; and &lt;STRONG&gt;area&lt;/STRONG&gt;, but other sparklines from &lt;A href="http://omnipotent.net/jquery.sparkline/#s-about"&gt;http://omnipotent.net/jquery.sparkline/#s-about&lt;/A&gt;, seem to work as well.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 18:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362872#M107206</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-06-23T18:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reset the "search timeframe" based on data in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362873#M107207</link>
      <description>&lt;P&gt;I am dependent on time data, but the time data isn't in the timeframe of the original query. The timeframe of the original query isn't relevant.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 21:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362873#M107207</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2017-06-23T21:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reset the "search timeframe" based on data in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362874#M107208</link>
      <description>&lt;P&gt;Can you identify the "interesting" earliest/latest time and pass them as variable using the | map command?&lt;BR /&gt;
Or if you only need a custom length sparkline with a special start/end condition (e.g. value larger than 100), you can edit the sparkline field using mv.... commands. E.g. Leaving only 10 tailing zeros at the end of the sparkline (fieldname=spcount and sorry about the regexp):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| nomv spcount | eval spcount =replace(spcount,"(##__SPARKLINE__##,[0-9,]+[1-9]{1},)\S+(0,0,0,0,0,0,0,0,0,0)$|(##__SPARKLINE__##,[0-9,]+)","\1\2\3") |  makemv delim="," setsv=true spcount
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jul 2017 13:39:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362874#M107208</guid>
      <dc:creator>gergelybata</dc:creator>
      <dc:date>2017-07-10T13:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reset the "search timeframe" based on data in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362875#M107209</link>
      <description>&lt;P&gt;Interesting.  If I handed it to map, I'm afraid I'd be pinned to the limits of a subsearch, but it's an interesting idea.&lt;/P&gt;

&lt;P&gt;I ended up doing something much like your example, but it's a pain, and certainly not easy to explain to anyone else.&lt;/P&gt;

&lt;P&gt;What you absolutely can't do is something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | eval _time=fieldX | timechart fixedrange=false bins=100 count by fieldY 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I believe it bins everything at some range relevant to the original query, which in my case ends up being a bin size of a second. So, you end up with thousands of bins.&lt;/P&gt;

&lt;P&gt;I think I'd be set if I could do something like...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | eval _time=fieldX | eventstats min(_time) as _search_earliest max(_time) as _search_latest | timechart fixedrange=100 bins=20 count by fieldY
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 00:18:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-reset-the-quot-search-timeframe-quot-based-on-data-in/m-p/362875#M107209</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2017-07-12T00:18:40Z</dc:date>
    </item>
  </channel>
</rss>

