Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grafana filter on unindexed ElasticSearch field (zeros) so they aren't shown in Table Panel

We have a table that shows warning counts in our services, but we aren't interested in those that are zero.

Because the warning count is a un-indexed number (integer) we can't include it as a filter criteria. How can these be removed from our dashboard?

like image 417
user1016765 Avatar asked Nov 07 '22 03:11

user1016765


1 Answers

I am not familliar with Grafana, but ES has an "exists" query which might be what you are looking for. So, if you can integrate this in your dashboard (or find that Grafana functionality that uses it) it might help you. For your information (because Grafana might use this as well like it is) you can use "exists" query in the Lucene query dsl as _exists_. A practical example - _exists_:warning_count_field. More about this here

The same question seems to have been asked before in a more or less similar form: https://community.grafana.com/t/how-to-query-for-null-values/799/5 and the answer is the same as the one I posted above: the _exists_ filter/query.

like image 99
Andrei Stefan Avatar answered Nov 15 '22 08:11

Andrei Stefan