To change default time filter duration globally in Kibana, which is last 15 minutes. Follow the steps given below,


1. Find index.js in kibana_home\src\public\index.js

2. Search for Timefilter()

      function Timefilter() {
      	Timefilter.Super.call(this);
      	var self = this;
      	self.enabled = false;
      	var timeDefaults = {
      		 from: 'now-15m',
      		 to: 'now'
      	 };
      }

       

      3. Change the default value of timeDefaults to your time filter and save index.js Eg: now-5y for last 5 years


      function Timefilter() {
      	Timefilter.Super.call(this);
      	var self = this;
      	self.enabled = false;
      	var timeDefaults = {
      		from: 'now-5y',
      		to: 'now'
      	};
      }

       


      For Skedler to work with the time filter changes in Kibana

      1. Find timedefault.json in skedler_home/src folder

      2. The default filter time is given as a json object 

      {"from":"now-15m", "to":"now"}

       3. Change the filter time as same as Kibana default filter time.