TOP 10 Average data sheet

Hi!

I need to get a list of the processes which are running the longest on average. But when I set the Metrics to "average" of the "process_time" field and split the rows by the term "process_name" I get confusing results where I know not all documents have been taken into account. If I change the size of the number of terms, the average metric changes too, not only the number of the terms returned.
How can I get all terms' average process time calculated and then listing the TOP 10 of those?

Thanks!

Hi YvorL,

that's really strange, I just tried the some thing (well instead of process_time I average on bytes and instead of process_name I split the rows on OS, but that shouldn't change a thing) and it works for me. This is my configuration

Which version of Kibana are you using?

Version 6.6.0

I can reproduce it with other metrics like in the case below. I have the max value there so you see (or at least believe more) that the terms are the same without sharing those.

Would you mind sharing your request JSON? (Inspect in the top nav, View: Requests in the top right corner and there the content of the Request tab)
If something is going wrong it should show in the actual request sent to Elasticsearch.

Sorry @flash1293, I didn't see the notice about your message.
It turned out that this behavior is expected since terms aggregation count is approximate.

Thank you for your time!

Hi @YvorL,

great to hear you solved your problem.

The difference in counts shouldn't be that big due to that - you may have too many shards for your index (the default is 5). Ideally the size of a shard should be 10-40GB - if you have less data, just use a single shard and this problem shouldn't happen.

1 Like

you may have too many shards for your index (the default is 5). Ideally the size of a shard should be 10-40GB

That's right, the shard count change is on the roadmap, but first I need to change other things in the index in question.

Thanks again!

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