<?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 do change the default search period for an app? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9496#M148</link>
    <description>&lt;P&gt;you can specify a custom default search period in a copy of times.conf for your app. if you're using saved searches for your app, you could also specify the time range in the search, as described here: 
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.2/User/ChangeTheTimeRangeOfYourSearch" rel="nofollow"&gt;http://docs.splunk.com/Documentation/Splunk/4.2.2/User/ChangeTheTimeRangeOfYourSearch&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2010 07:58:42 GMT</pubDate>
    <dc:creator>piebob</dc:creator>
    <dc:date>2010-01-28T07:58:42Z</dc:date>
    <item>
      <title>How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9495#M147</link>
      <description>&lt;P&gt;How can I change the default search period for an app so that my users search the last 15 minutes by default instead of all time?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2010 10:14:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9495#M147</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-01-26T10:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9496#M148</link>
      <description>&lt;P&gt;you can specify a custom default search period in a copy of times.conf for your app. if you're using saved searches for your app, you could also specify the time range in the search, as described here: 
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.2/User/ChangeTheTimeRangeOfYourSearch" rel="nofollow"&gt;http://docs.splunk.com/Documentation/Splunk/4.2.2/User/ChangeTheTimeRangeOfYourSearch&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2010 07:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9496#M148</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2010-01-28T07:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9497#M149</link>
      <description>&lt;P&gt;sure but how do ensure that is the selection that they will always start with?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2010 09:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9497#M149</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-01-28T09:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9498#M150</link>
      <description>&lt;P&gt;This would be useful, my users often set it to all time, which then stays as the default until they change it. Then their searches take ages and slow down the whole system. I know I could customise their timerangepicker but resetting their default selection would be useful also.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2010 16:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9498#M150</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-03-25T16:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9499#M151</link>
      <description>&lt;P&gt;In order to establish the default value for time range, the viewstates.conf file will need to be modified.&lt;/P&gt;

&lt;P&gt;The stanza that needs to either be modified or added is below:&lt;/P&gt;

&lt;P&gt;[dashboard:_current]
TimeRangePicker_0_1_0.default = Last 4 hours&lt;/P&gt;

&lt;P&gt;In the example above, the default option is 4 hours.  For last 60 minutes, you would change the "Last 4 hours" to "Last 60 minutes".&lt;/P&gt;

&lt;P&gt;Now, to make the actual modification, you'll need to do it in 2 separate locations - one for current users and another for new users.&lt;/P&gt;

&lt;P&gt;Current users:
1.  Navigate to $SPLUNK_HOME/etc/users/ [your user] /search/local/viewstates.conf
2.  Edit viewstates.conf
3.  Modify the "TimeRangePicker_0_1_0.default" to your liking&lt;/P&gt;

&lt;P&gt;[dashboard:_current]
TimeRangePicker_0_1_0.default = Last 4 hours&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Save
NOTE:  No need to restart Splunk for this change to take effect as it is parsed at login time.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;New users:
1.  Navigate to $SPLUNK_HOME/etc/apps/search/local
2.  If viewstates.conf does not exist, create a text file, rename to viewstates.conf and add the following lines:&lt;/P&gt;

&lt;P&gt;[dashboard:_current]
TimeRangePicker_0_1_0.default = Last 4 hours&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Save file&lt;/LI&gt;
&lt;LI&gt;Restart Splunk -- IMPORTANT!!!!&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;NOTE:  If a user changes the search to "All Time", the default for that specific user will be changed from your default choice to "All Time".&lt;/P&gt;

&lt;P&gt;Again, replace "Last 4 hours" with the specific default time range you would like your NEW users to have.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2010 02:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9499#M151</guid>
      <dc:creator>rithy</dc:creator>
      <dc:date>2010-05-05T02:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9500#M152</link>
      <description>&lt;P&gt;I used to see, some user won't bother what is period selected in search. So, I am looking, it should not change default search period for an app?&lt;/P&gt;

&lt;P&gt;In the above solution, it seems, once user change the default period, it will change.  Please advise if any one has solution. &lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2011 06:05:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9500#M152</guid>
      <dc:creator>rajiv_kumar</dc:creator>
      <dc:date>2011-01-21T06:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do change the default search period for an app?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9501#M153</link>
      <description>&lt;P&gt;The instructions in rithy's answer above did not quite work for me on a 4.2.2 system.&lt;BR /&gt;
I got it to work with these stanzas:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dashboard_live:_current]
TimeRangePicker_0_1_0.default = Last 4 hours

[flashtimeline:_current]
TimeRangePicker_0_1_0.default = Last 4 hours
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in the viewstates.conf files previously mentioned:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;$SPLUNK_HOME/etc/users/ [your user]
/search/local/viewstates.conf&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;$SPLUNK_HOME/etc/apps/search/local/viewstates.conf&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The minor difference being &lt;EM&gt;dashboard&lt;/EM&gt; becomes &lt;EM&gt;dashboard_live&lt;/EM&gt; and the additional &lt;EM&gt;flashtimeline&lt;/EM&gt; entry.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2011 15:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-change-the-default-search-period-for-an-app/m-p/9501#M153</guid>
      <dc:creator>mslvrstn</dc:creator>
      <dc:date>2011-08-12T15:27:07Z</dc:date>
    </item>
  </channel>
</rss>

