Realtime metric value alerter based on the aggregated data in Druid

We have data stored in Druid with some metric data, like response time, and we want to do
metric value check, and fire a alert if the metic value exceed the threshold, currently we do

a query in a fixed interval (like one minute), and based on the query result to fire the alert.

But I think this is not a so “elegant” way to do thing, in my opinion, aggregate data and do the

threshold checking thing is a more nature way.

Is there a better way with druid to do this? Thanks.

Periodic queries are currently the best way to build alerting on top of Druid. It doesn’t have functionality to fire alerts in response to incoming data, it just indexes them.

If performance is an issue, you could try enabling local caching on your realtime workers. This won’t change query results, but will let them use cached results for their immutable on-disk chunks and use real-time results for their in-memory chunks.