Hello All,
We are trying achieve math round on aggregated results from monitor in alert message.
Here is our Monitor Response:
{
"_shards": {
"total": 1,
"failed": 0,
"successful": 1,
"skipped": 0
},
"hits": {
"hits": [],
"total": {
"value": 124,
"relation": "eq"
},
"max_score": null
},
"took": 5,
"timed_out": false,
"aggregations": {
"route": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"avg_responsetime": {
"value": 57.06632846593857
},
"doc_count": 64,
"key": "Direct"
},
{
"avg_responsetime": {
"value": 98.60404980977377
},
"doc_count": 60,
"key": "Indirect"
}
]
}
}
}
The Trigger Message we are trying is – Actual : {{ctx.results.0.aggregations.route.buckets.0.avg_resp.value}} Secs
This results like Actual : 73.47249984741211 Secs.
But the results expected is Actual : 73.47 Secs
Please any one help me how to get round in painless code / Mustache / Monitor Query.
Reg,
Rakesh