Put Max date filter by default in Kibana

Hi All,

My question is related to

Is that possible today?

I want to put filter by default in Kibana dashboard which will always select max date from date field. Is it possible with Query DSL if yes kindly tell how ?

Thanks & Regards
Suhas Gupta

I have a couple thoughts on how this could be accomplished.

Canvas pipelines support subexpressions, so you should be able to accomplish this with something like the following:

essql {string "SELECT .... WHERE timestamp <=" {esdocs <get latest document> | getCell <timestamp field>} }

The Canvas pipeline expressions are also coming to Kibana proper and will be soon the bases of all visualizations which will make things like this much easier in the future.

Another, possibly easier solution is to alter the dasboard/visualization as part of your daily job. Here is the API for the underlying data Kibana persists: https://www.elastic.co/guide/en/kibana/current/saved-objects-api.html.

Hi Tylersmalley,

Thank you for replying, I am not pro in elasticsearch or kibana. Could you kindly tell if I can write this essql in query DSL in Filter in kibana or where can I use this query.

Thanks
Suhas

Hello @tylersmalley, Kindly guide how to use this query, can I write this query in filter in DSL query section of kibana, Or I have to write this query at some other location.

Thanks & Regards
Suhas Gupta

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.