Slack Attachment Actions

alerting

(Jamesspi) #1

Hi!

I'd like to use actions within Slack attachments (buttons etc). This works fine in the slack message builder, but watcher doesn't seem to like the syntax:

      "attachments": [
        {
          "color": "danger",
          "title": "XXXXXXXXXX",
          "title_link": "xxxxxxxxxxxf",
          "text": "xxxxxxxxxxxxx.",
           "actions": 
            {
              "type": "button",
              "name": "ack",
              "text": "Acknowledge",
              "url": "xxxxxxxxxxxxxx",
              "style": "primary"
            },
            "fields": [
            {
              "title": "xxxxxxxxxx",
              "value": "xxxxxxxxxxxx",
              "short": true
            },
            {
              "title": "xxxxxxx",
              "value": "xxxxxxxxxxx",
              "short": true
            }
          ]
        }
      ]

Everything else (fields, title etc) works.

message in Kibana:

Watcher: [parse_exception] could not parse message attachment field. unexpected field [actions]

Running 6.1.0 for all stack elements.

Thanks,
James


(Alexander Reelsen) #2

Hey,

you are right, this is currently not possible. I'll take a look what needs to be done to support this.

--Alex


(Jamesspi) #3

Great, thanks @spinscale!


(system) #4

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