Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a time range search in Kibana

We are using the ELK for log aggregation. Is it possible to search for events that occured during a particular time range. Lets say I want to see all exceptions that occurred between 10am and 11am in last month.

Is it possible to extract the time part from @timestamp and do a range search on that somehow (similiar to date() in SQL)?

like image 251
markus Avatar asked May 22 '15 12:05

markus


1 Answers

Thanks to Magnus who pointed me to looking at scripted fields. Take a look at: https://www.elastic.co/blog/kibana-4-beta-3-now-more-filtery

or

https://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-request-script-fields.html

Unfortunately you can not use these scripted fields in queries but only in visualisations.

So I resorted to a workaround and use logstashs drop filter to remove the events I don't want to show up in Kibana in the first-place. That is not perfect for obvious reasons but it does the job.

like image 63
markus Avatar answered Sep 28 '22 05:09

markus