How to change Kibana-4's default Time Filter?

In 4.5.0, you should be able to change it anytime in the Kibana ui by navigating to "Settings"->"Advanced". See this link. Just edit the timepicker:timeDefaults to something like { "from": "now-90d", "to": "now", "mode": "quick" }


You can preset time filter in dashboard link. For example setting to last 6 hours:

kibana-host:5601/#/dashboard/My-Dashboard?_g=(time:(from:now-6h,mode:quick,to:now))

The time-filter is not saved as part of the dashboard, and shouldn't be in my opinion. A dashboard shows you the data organized in a certain kind of way, and each user should be able to modify the date-range of their view however they see fit.

If you're interested in changing the kibana default, you can do so by modifying the code.
Go to the file 'services/timefilter.js', and there is a variable called timeDefaults. You can modify it to match the default value you're interested in.

In the code it looks like this:

var timeDefaults = {
    from: 'now-15m',
    to: 'now'
};

The from and to properties are parsed using ISO8601 format.

Tags:

Kibana 4