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?