Looping through Aggregations to trigger multiple emails

alerting

(Suman Reddy) #1

Hi All,

Can someone please advise if I can achieve below in some or other way in Kibana Watcher Notifications/Actions.

"actions": {
    {{#ctx.payload.aggregations.app_id.buckets}}
    "send_email": {
      "email": {
        "profile": "standard",
        "to": [
          "sumangodisela@suman.com",        ],
        "subject": "[PCF DCE] APP Health Alerts",
        "body": {
          "text": " {{key}}"
        }
      }
    }
    {{/ctx.payload.aggregations.app_id.buckets}}
  }

Requirement is that for each aggregation it should trigger a mail notification.

Thanks,
Suman G


(Alexander Reelsen) #2

Hey,

only .a single email can be sent from an action currently. An alternative might be to sent the payload to logstash and send several emails from there, if that solves your use-case.

--Alex


(Suman Reddy) #3

thanks Alex!


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.