slack
Reference for the `slack` action.
slack· action · runnanook doc slackfor the same content in your terminal.
Posts alert attachments to a Slack channel via incoming webhook.
Options
| Option | Type | Default | Description |
|---|---|---|---|
url | string | required 🔒 | target webhook URL |
method | enum | POST | HTTP method (one of: GET, POST, PUT, PATCH, DELETE) |
retries | string | 0 | number of retries on failure |
backoff | string | 1s | retry backoff |
Examples
Slack channel via incoming webhook
[]
= "slack"
[]
= "${SLACK_WEBHOOK_URL}"
Custom payload via rule body
[]
= "slack"
[]
= "${SLACK_WEBHOOK_URL}"
[[]]
= "disk.usage > 90%"
= "ops"
= '{"text":":warning: {{ trigger.labels.mount }} at {{ trigger.val }}%"}'