How to visualise aggregated queries in dashboard

Hi all, I'm using OpenSearch v 2.5.0 with Kibana and I'm trying to visualise a metric which is a calculation of the count of duplicated ID's and then determine the average of this count.

I can get the value in Dev Tools when running the query but how I can visualise this metric I'm not sure if this is even possible. I've tried a number of options and can get the count of duplicated ID's but not the average number as a single metric.

GET /index-metrics/_search
  "size": 0,
  "aggs": {
    "duplicate_count": {
      "terms": {
        "field": "RequestId.keyword",
        "size": 10000,
        "min_doc_count": 2
    "average_count": {
      "avg_bucket": {
        "buckets_path": "duplicate_count>_count"

Can anyone give any tips on how I can achieve this?

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

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