Possible to set min_doc_count in TSVB?

Hi,

I have a visualization built in TSVB that visualize cpu usage per kubernetes pod in a Time Series. This works fine in Kibana 6.x but after upgrading to 7.4.2 I get a "too many buckets" error message. The exact error message is "error":{"error":{"root_cause":[{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10096]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":10000}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"metricbeat-7.4.1-2019.11.14-000001","node":"ayphGaJ8ROqSqBPVPJ4osg","reason":{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10096]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":10000}}]},"status":503}

When I inspect the request sent to Elasticsearch, I see that TSVB sets min_doc_count:0, which will return a bucket for all pods that have ever existed. Since pods are recreated from time to time, there are a lot of buckets containing pods with 0 doc_count. These pods are irrelevant to have. So I wonder if it's possible to set the min_doc_count in the TSVB somehow?

Here's a screenshot of my TSVB:

Hey @tobias.berg,

Unfortunately, this isn't possible to configure with TSVB at the moment. If you want, you can open a feature request to have this considered.

Thanks for the answer, and link to the feature request form. Will look into this.

For now, I think we will solve the issue by just limiting the amount of pods in the aggregation.

Thanks!

/Tobias