Alerts
Create an alert with multi-channel notifications
Each alert can send to multiple notification channels simultaneously.
The current server build wires these channel types:
| Type | Required config fields |
|---|---|
| webhook | url, optional method, headers, body_template |
| telegram | bot_token, chat_id, optional message_template, parse_mode |
| slack | webhook_url, optional channel, username, icon_emoji |
Each channel has an independent enabled flag so you can mute a channel without removing it.
post/alerts
Request body
Example request
{
"name": "High error rate",
"query": "level=error | stats count as errors | where errors > 100",
"interval": "5m",
"channels": [
{
"type": "webhook",
"name": "Slack Ops",
"config": {
"url": "https://hooks.slack.com/services/T00/B00/xxx"
}
}
]
}Response
Alert created
Example response
{
"data": {
"id": "alt_xyz789",
"interval": "5m",
"channels": [
{
"type": "webhook",
"name": "Slack Ops",
"config": {
"url": "https://hooks.slack.com/services/T00/B00/xxx"
}
}
]
}
}