<?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 to display time ranges based on chart/table data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229168#M67875</link>
    <description>&lt;P&gt;Thanks!  I figured it out just before your post.  Thanks again for another great solution!&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2016 13:52:46 GMT</pubDate>
    <dc:creator>chadman</dc:creator>
    <dc:date>2016-08-15T13:52:46Z</dc:date>
    <item>
      <title>How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229162#M67869</link>
      <description>&lt;P&gt;I have a timechart that works ok, but can be hard to read because of how Splunk averages the data.  I have tried to show the chart as values and that also works, but still is hard to read.  My goal is so have a nice way to preset some time ranges to the user.  The data is either true/false and gets reported every min.  I would like to display to the users all the time ranges the data is true in the search.  Below is the chart I tried, but I'm not sure a chart is the best way to display this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="data1" host=host1
        | eval "Workstation Locked" = if(lock="True",1,0) 
        | chart values("Workstation Locked") as "Workstation Locked" by date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 12:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229162#M67869</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-15T12:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229163#M67870</link>
      <description>&lt;P&gt;Have you look at the timeline app?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/3120/"&gt;https://splunkbase.splunk.com/app/3120/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 12:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229163#M67870</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-15T12:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229164#M67871</link>
      <description>&lt;P&gt;that does look cool, but I prefer a search option that does not require an addon if that's possible.  It does not have to be in a chart. &lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229164#M67871</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-15T13:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229165#M67872</link>
      <description>&lt;P&gt;Try this then&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="data1" host=host1
| autoregress lock
| streamstats count(eval(lock!=lock_p1)) as group 
| stats earliest(_time) as start latest(_time) as end by host group
| eval start=strftime(start, "%c")
| eval end=strftime(end, "%c")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229165#M67872</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-15T13:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229166#M67873</link>
      <description>&lt;P&gt;Looks good!  I forgot to mention in my post that I would only like to see the time ranges when lock=1.  I tired to add a | where lock=1 in the beginning of the search, but that broke it.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229166#M67873</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-15T13:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229167#M67874</link>
      <description>&lt;P&gt;Add the &lt;CODE&gt;where&lt;/CODE&gt; after just before the &lt;CODE&gt;stats&lt;/CODE&gt;. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype="data1" host=host1
 | autoregress lock
 | streamstats count(eval(lock!=lock_p1)) as group 
 | where lock=1
 | stats earliest(_time) as start latest(_time) as end by host group
 | eval start=strftime(start, "%c")
 | eval end=strftime(end, "%c")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:51:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229167#M67874</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-15T13:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time ranges based on chart/table data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229168#M67875</link>
      <description>&lt;P&gt;Thanks!  I figured it out just before your post.  Thanks again for another great solution!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-time-ranges-based-on-chart-table-data/m-p/229168#M67875</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-15T13:52:46Z</dc:date>
    </item>
  </channel>
</rss>

