Unique count alert


I’m new to Grafana and I’m trying to set up an alert based on a Unique Count series. Trouble is, I cannot get the configuration to work as I want.

I’m using Elasticsearch as a datasource using a Metricbeat populated index. The goal is to monitor the number of servers that are up. Metricbeat stats period are send every 10 seconds, so the idea was to count unique values of host.id.keyword or host.name.keyword with the time interval set to a period greater than that (say, 1 minute)

The resulting graph is working perfectly.
When setting the alert however, I’m getting values that I do not understands (here 0.640)
Even ignore the last minute of data does not help.

What Am I doing wrong or missing here ?

EDIT : Forgot to mention that I’m using Grafana 6.2.0-beta1 as I need ES 7.x compatibility.


Not much going here, but hopefully more details will draw attention back :slight_smile:
I think there clearly is something going on with the alert module. It looks like it does not aggregate values at all like the query does.

If I set min time interval to 1m, I can see in the query inspector that each bucket is indeed 60 seconds appart. But the alert data array has an entry every 200ms, not doing any aggregation. Am I missing something or this a bug ?

1 Like

Hi, I’m stuck in the same situation.
Have you managed to get aggregation on unique count for alerting?