Kibana: Filter Greater Than Count

Created on 30 Dec 2016  路  6Comments  路  Source: elastic/kibana

In Kibana, I created a Table visual.

I want to count the number of records aggregated by a field (hostname).

I want to be able to filter the results where the Count>X.

However, typing Count>:10 in the kibana search yields zero results.

Visualizations

Most helpful comment

To @LeeDr 's comment, you can inject this field here:

image

See also https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_minimum_document_count_3 for more info.

More generally, this functionality is similar to a HAVING-clause in SQL. Elasticsearch supports this functionality using the bucket_selector pipeline-aggregation. (https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-pipeline-bucket-selector-aggregation.html).

This is not supported by Kibana. Support for pipeline aggregations is an outstanding improvement https://github.com/elastic/kibana/issues/4584.

All 6 comments

You should be able to use something like this in the Advanced JSON field {"min_doc_count": 10}

To @LeeDr 's comment, you can inject this field here:

image

See also https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_minimum_document_count_3 for more info.

More generally, this functionality is similar to a HAVING-clause in SQL. Elasticsearch supports this functionality using the bucket_selector pipeline-aggregation. (https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-pipeline-bucket-selector-aggregation.html).

This is not supported by Kibana. Support for pipeline aggregations is an outstanding improvement https://github.com/elastic/kibana/issues/4584.

What about anything with Count

I'm not seeing anything in the docs that would filter only aggregations with counts less than some number. If you really need this you might have to ask on the Elasticsearch forum here;
https://discuss.elastic.co/c/elasticsearch

What about anything with Count = X.
Count < X would be nice too.

The point is: I really need use the both features described above and I am looking for a answer since two days ago... If is really impossible insert this logic on Kibana visualizes, ok I will just stop to look, but the problem is that I have large difficulties to accept that it is impossible, because seems to be some simple thing, so I'm still looking for it.

Could someone give me a definitive answer?

If you're running a recent version of the stack, you could check out the Visual Builder visualization type. It might allow you to filter on the aggregated count.

Was this page helpful?
0 / 5 - 0 ratings