Hi,
I'm brand new to Watcher and trying to understand some of the nuances. I am looking at examples I have found and don't understand some of the conditions. Could someone take a look at this script and explain what it is doing? I don't fully understand the the condition compare bolded part (ctx.payload.aggregations.load_time_outlier**.values.6.value**). How is that configured or where does it come from? I'm not finding anything in the documentation to help explain this.
"trigger": {
"schedule": {
"interval": "5m"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
""
],
"types": [],
"body": {
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"_index": "mwp"
}
},
{
"range": {
"@timestamp": {
"gte": "now-5m",
"lt": "now"
}
}
},
{
"term": {
"json.data.team": "sbn"
}
},
{
"term": {
"json.tags": "http-api-receive"
}
},
{
"terms": {
"json.data.responseStatusCode": [
200
]
}
}
]
}
},
"aggs": {
"load_time_outlier": {
"percentiles": {
"field": "json.data.timeTakenInMSec",
"keyed": false
}
}
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.aggregations.load_time_outlier.values.6.value": {
"gte": 1000
}
}
}
Thanks,
Rhonda Bailey