-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Open
Labels
:Data Management/Watcher>enhancementTeam:Data ManagementMeta label for data/management teamMeta label for data/management team
Description
It does not appear that the Watcher Slack action supports adding Slack Actions. It would be very helpful to have the ability to add actions such as buttons for alert acknowledgement. I'm currently able to do this outside of Elasticsearch with a POST containing the following body:
{
"title": "*Something bad happened*",
"text": "*Something bad happened*",
"attachments": [
{
"text": "Something bad happened",
"fallback": "Something bad happened",
"callback_id": "ack_alert",
"color": "danger",
"attachment_type": "default",
"actions": [
{
"name": "acknowledge",
"text": "Acknowledge",
"type": "button",
"value": "acknowledge"
}
]
}
]
}
I added the below to my watch configuration in an attempt to get the same functionality out of Watcher:
"slack": {
"account": "monitoring",
"message": {
"from": "Elasticsearch Watcher",
"to": [
"#channel"
],
"text": "*Something bad happened*",
"attachments": [
{
"color": "warning",
"title": "Something bad happened",
"text": "Something bad happened",
"callback_id": "ack_alert",
"actions": [
{
"name": "acknowledge",
"text": "Acknowledge",
"type": "button",
"value": "acknowledge"
}
]
}
]
}
}
But the error I get is Watcher: [parse_exception] could not parse message attachment field. unexpected field [callback_id] which makes me assume that the Slack action in Watcher does not support adding actions to attachments.
Elasticsearch version: 6.2.4
Metadata
Metadata
Assignees
Labels
:Data Management/Watcher>enhancementTeam:Data ManagementMeta label for data/management teamMeta label for data/management team