How to return current date & time in Kibana

in Visualation - Datatable column, am trying to display the current date & time at run time.
How to do that any suggestions?

1 Like

I can't think a straightforward way to do this currently. A scripted field may be able grab the current time and be used for your column data, but currently kibana only supports lucene expressions which aren't able to grab the current time. https://github.com/elastic/kibana/issues/6529 and https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-painless.html may eventually be able to help but this isn't available to use in Kibana yet.

I got it by enabling groovy script & using Json input field by passing below to get CurentDate time milliseconds atleast

{"script":"new Date().getTime()", "lang":"groovy"}