Versions AWS OpenSearch 1.3.2
Describe the issue:
I have a trigger whose condition is per-bucket
"aggregations": {
"domain-count": {
"terms": {
"field": "domain.keyword",
"size": 100,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_key": "asc"
}
]
}
}
}
{
"buckets_path": {
"doc_count": "_count"
},
"parent_bucket_path": "domain-count",
"script": {
"source": "params.doc_count >= 5",
"lang": "painless"
},
"gap_policy": "skip"
}
In the action, I need to only refer to buckets for which the condition returned true. I can’t seem to find documentation on how to access the trigger response buckets (which when I hit “previw condition response”, tells me the number of expected buckets at the moment).
I can’t use
{{#ctx.results.0.aggregations.domain-count.buckets}} [{{key}}]: {{doc_count}}, {{/ctx.results.0.aggregations.domain-count.buckets}}
because that iterates over ALL the query results and I only need the ones for which the trigger returned true.
Thank you for any advice.
Configuration:
Running Alerting via OpenSearch UI
Relevant Logs or Screenshots: