Simple metric with count not respecting min_doc_count parameter

Hi all,

I'm trying to set up a dashboard with several metrics with custom colors where the metric is a simple count of documents in the index in a specific time interval.

When there are no records in the index, "no results found" is displayed instead of 0, even when { "min_doc_count": 0 } is defined to 0.

Should this be the standard behaviour?

Many thanks

BR
Alex

Hi @Alexandre_Juma,

the min_doc_count is a parameter of the aggregations. so you could add this for example for a 'Histogram', or a 'Terms' aggregations, but not for a metric.

Are you sure there are documents in the time-range that is selected for Kibana? For your specific configuration, this is default behaviour in Kibana, because it allows you to see the difference between "no data" and actual 0-valued metric.

The way you could work-around is use a 'Date Range' aggregation, and specify the date-range you are interested in.

For example:

thx,

Hi Thomas,

Thanks for the tip. It's working now!

I tought I was doing exactly the same by defining In the filter box (as shown in my screenshot):

@timestamp:[now-10m/m TO now]

Apparently not :slight_smile:

Best Regards
Alexandre

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.