webhook

Reference for the `webhook` action.

webhook · action · run nanook doc webhook for the same content in your terminal.

POSTs alert payloads as JSON to a generic webhook URL.

Options

OptionTypeDefaultDescription
urlstringrequired 🔒target webhook URL
methodenumPOSTHTTP method (one of: GET, POST, PUT, PATCH, DELETE)
retriesstring0number of retries on failure
backoffstring1sretry backoff

Examples

Generic JSON webhook

[channels.ops]
type = "webhook"
[channels.ops.opts]
url     = "${OPS_WEBHOOK_URL}"
retries = 3
backoff = 2000

Custom body shape

[channels.ops]
type = "webhook"
[channels.ops.opts]
url  = "${OPS_WEBHOOK_URL}"
body = '{"text":"{{ kind }} {{ rule }} on {{ trigger.source }}"}'