Hi folks, we have an case - Watcher performs Pagerduty/webhook action" only 10 times per trigger interval. We use foreach iteration in action and we receive only 10 notifications in Pagerduty.
This is visible in Watcher simulation log - number_of_actions_executed": 10
"condition": {
"type": "compare",
"status": "success",
"met": true,
"compare": {
"resolved_values": {
"ctx.payload.hits.total": 78
}
}
},
"actions": [
{
"id": "my_webhook",
"type": "webhook",
"status": "simulated",
"number_of_actions_executed": 10,
Watcher configuration:
{
"trigger": {
"schedule": {
"interval": "1m"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"prod-logs-*"
],
"rest_total_hits_as_int": true,
"body": {
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "log_level:ERROR AND (environment:prod AND arena:playlive)"
}
},
{
"range": {
"@timestamp": {
"gte": "now-15m"
}
}
}
]
}
},
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
]
}
}
}
},
"condition": {
"compare": {
"ctx.payload.hits.total": {
"gt": 0
}
}
},
"actions": {
"my_webhook": {
"foreach": "ctx.payload.hits.hits",
"max_iterations": 100,
"webhook": {
"scheme": "http",
"host": "10.10.10.222",
"port": 31311,
"method": "post",
"params": {},
"headers": {},
"body": "{{#toJson}}ctx.payload{{/toJson}}"
}
}
}
}
How can we increase this number to unlimited, because we want to have all events sent from Watcher - not only first 10.
Thanks in advance!