Filter in metrics

I need to filter out time specified in format HH:mm:ss. I need to filter out values greater than a particular time say 9 am and get the count of those in metric graph.
How can this be achieved in kibana

Assuming your field is mapped to a datetime in Elasticsearch, yes, this is possible. To do it, you'll need to use a Script Query, which I believe you can do from the filter bar at the top, using a custom filter and the JSON for the script query.

Thanks @Joe_Fleming.I need to filter time for each id
That is
For id 1 :Filtering values greater than 5pm
id 2:Filtering values greater than 9pm

Is this possible using the script query.I tried with inline but the records were not getting filtered

I honestly don't know. The scripted filters use the Painless scripting, and looking at the docs on data types, there is no mention of date handling. It's possible date operations are not supported. However, the API reference mentioned a number of date methods, so I'm not at all sure.

Bottom line is, until there is better integration, you'd have to learn and use Painless. The getting started area is probably a good place to start. You can also try asking question about it over in the Elasticsearch section too.

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