Grafana with ElasticSearch - Unable to view 95th Percentile

Hello all,

I have a problem about showing percentile value on grafana. Actually this issue is mentioned before in the community, but there is no a clear solution for it. you can check it here

Could you please inform me why grafana can not show the percentile value of json response.

You can find request/response json and my configuration below.

Thanks in advance…

Request:
{
“size”: 0,
“query”: {
“bool”: {
“filter”: [
{
“range”: {
@timestamp”: {
“gte”: “1551387600000”,
“lte”: “1554065999999”,
“format”: “epoch_millis”
}
}
},
{
“query_string”: {
“analyze_wildcard”: true,
“query”: “*”
}
}
]
}
},
“aggs”: {
“2”: {
“terms”: {
“field”: “context.service.name”,
“size”: 10,
“order”: {
“_term”: “desc”
},
“min_doc_count”: 1
},
“aggs”: {
“1”: {
“cardinality”: {
“field”: “transaction.id”
}
},
“3”: {
“cardinality”: {
“field”: “error.id”
}
},
“4”: {
“avg”: {
“field”: “transaction.duration.us
}
},
“5”: {
“percentiles”: {
“field”: “transaction.duration.us”,
“percents”: [
“95”
]
}
}
}
}
}
}

Response
{
“took” : 3,
“timed_out” : false,
“_shards” : {
“total” : 11,
“successful” : 11,
“skipped” : 0,
“failed” : 0
},
“hits” : {
“total” : 499,
“max_score” : 0.0,
“hits” :
},
“aggregations” : {
“2” : {
“doc_count_error_upper_bound” : 0,
“sum_other_doc_count” : 0,
“buckets” : [
{
“key” : “QSmart_QmaticService_WebApi”,
“doc_count” : 137,
“1” : {
“value” : 129
},
“3” : {
“value” : 0
},
“4” : {
“value” : 2.3955108527131785E7
},
“5” : {
“values” : {
“95.0” : 2582999.9999999935
}
}
},
{
“key” : “QSmart_CustomerService_WebApi”,
“doc_count” : 23,
“1” : {
“value” : 19
},
“3” : {
“value” : 0
},
“4” : {
“value” : 1.0103267894736842E9
},
“5” : {
“values” : {
“95.0” : 7.615958600000005E9
}
}
},
{
“key” : “OpenAPM”,
“doc_count” : 339,
“1” : {
“value” : 217
},
“3” : {
“value” : 0
},
“4” : {
“value” : 98741.93548387097
},
“5” : {
“values” : {
“95.0” : 617049.9999999997
}
}
}
]
}
}
}

Metric Setting: