kju
kju

Reputation: 146

Kibana 4.0 change default timefilter

How can I change default time filter duaration in Kibana 4.0? By default it is 15 minutes from now. It return default each time when I open new session Kibana.

Upvotes: 2

Views: 1159

Answers (3)

vvs14
vvs14

Reputation: 790

In Kibana 4.6.1, the default time can be changed from 15 minutes to ,for example, 24 hours easily.

Location of file to change:

kibanaDir/optimize/bundles/kibana.bundle.js

search for 'timepicker:timeDefaults', change the time from 15mto 24h, save the file and refresh the browser. You are done.

Upvotes: 0

Igor Shlyakhov
Igor Shlyakhov

Reputation: 56

Find index.js in [YourKibanaLocation]\src\public\index.js

and look for Timefilter() function (my Kibana version has it at string 115480).

After finding the function, change default value for timeDefaults to your liking and save index.js. Mine looked like this:

BEFORE

function Timefilter() {
 Timefilter.Super.call(this);

var self = this;

self.enabled = false;

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

AFTER

function Timefilter() {
Timefilter.Super.call(this);

var self = this;

self.enabled = false;

var timeDefaults = {
from: 'now-24h',
to: 'now'
};

You don't have to restart Kibana after that, just refresh your Kibana page.

PS. Sorry for unformatted answer, I'll change later, when not on mobile.

Upvotes: 4

Anish
Anish

Reputation: 1950

Click on the top right corner[Last 15 minutes]. You will get a dropdown from where you can change the time.

Upvotes: 0

Related Questions