Hello again!
I'm playing around watcher and needing some advice here.
I have created a watcher which condition is an array_compare. Once the condition is met on some of my array values, I need the related action to take only those values and not all of them for reporting purposes.
Could it be done in some way?
Extract of relevant sections follow:
This is my condition section:
"condition": {
"array_compare": {
"ctx.payload.aggregations.group_by_x.buckets": {
"path": "stats_az.std_deviation",
"lt": {
"value": 4e-9,
"quantifier": "some"
}
}
}
}
And this is my actions section:
"actions": {
"my-slack-action": {
"slack": {
"account": "myacct",
"message": {
"from": "watcher",
"to": [
"#elastic"
],
"text": "Std dev is {{#ctx.payload.aggregations.group_by_x.buckets}} {{key}}:{{stats_az.std_deviation}} {{/ctx.payload.aggregations.group_by_x.buckets}}"
}
}
}
}
Thank you for your help!
Leandro.