Search code examples
kibana-4

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


I have created a dashboard in Kibana-4 and shared on my Web-app. But its default time filter is 15 minutes.
How to change the default time filter in kibana-4?


Solution

  • 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.