diff --git a/content/docs/alerting/configuration.md b/content/docs/alerting/configuration.md index 20a93849a..40a0e8784 100755 --- a/content/docs/alerting/configuration.md +++ b/content/docs/alerting/configuration.md @@ -436,7 +436,9 @@ token: ## `` -Slack notifications are sent via [Slack webhooks](https://api.slack.com/incoming-webhooks). +Slack notifications are sent via [Slack +webhooks](https://api.slack.com/incoming-webhooks). The notification contains +an [attachment](https://api.slack.com/docs/message-attachments). ```yaml # Whether or not to notify about resolved alerts. @@ -449,20 +451,49 @@ Slack notifications are sent via [Slack webhooks](https://api.slack.com/incoming channel: # API request data as defined by the Slack webhook API. -[ color: | default = '{{ if eq .Status "firing" }}danger{{ else }}good{{ end }}' ] -[ username: | default = '{{ template "slack.default.username" . }}' ] -[ title: | default = '{{ template "slack.default.title" . }}' ] -[ title_link: | default = '{{ template "slack.default.titlelink" . }}' ] [ icon_emoji: ] [ icon_url: ] +[ link_names: | default = false ] +[ username: | default = '{{ template "slack.default.username" . }}' ] +# The following parameters define the attachment. +actions: + [ ... ] +[ color: | default = '{{ if eq .Status "firing" }}danger{{ else }}good{{ end }}' ] +[ fallback: | default = '{{ template "slack.default.fallback" . }}' ] +fields: + [ ... ] +[ footer: | default = '{{ template "slack.default.footer" . }}' ] [ pretext: | default = '{{ template "slack.default.pretext" . }}' ] +[ short_fields: | default = false ] [ text: | default = '{{ template "slack.default.text" . }}' ] -[ fallback: | default = '{{ template "slack.default.fallback" . }}' ] +[ title: | default = '{{ template "slack.default.title" . }}' ] +[ title_link: | default = '{{ template "slack.default.titlelink" . }}' ] # The HTTP client's configuration. [ http_config: | default = global.http_config ] ``` +### `` + +The fields are documented in the [Slack API documentation](https://api.slack.com/docs/message-attachments#action_fields). + +```yaml +type: +text: +url: +[ style: [ default = '' ] +``` + +### `` + +The fields are documented in the [Slack API documentation](https://api.slack.com/docs/message-attachments#fields). + +```yaml +title: +value: +[ short: | default = slack_config.short_fields ] +``` + ## `` OpsGenie notifications are sent via the [OpsGenie API](https://www.opsgenie.com/docs/web-api/alert-api).