-
Notifications
You must be signed in to change notification settings - Fork 0
Triggers
Triggers define how and where Piro sends notifications when an alert fires or recovers. Each trigger represents one notification channel. You can attach triggers to individual alert configs, or mark them as Global to automatically apply to all checks.
All triggers support Mustache templates ({{variable}}) for customizing message content. Available variables:
| Variable | Description |
|---|---|
{{alert_name}} |
Name of the check that fired |
{{alert_for}} |
Name of the service being monitored |
{{alert_status}} |
Current check status (e.g. Down, Degraded) |
{{alert_severity}} |
Severity level (e.g. Critical, Warning) |
{{alert_description}} |
Alert description / note (may be empty) |
{{alert_timestamp}} |
ISO 8601 timestamp of when the alert fired |
{{is_resolved}} |
true if this is a recovery notification |
{{is_triggered}} |
true if this is a new alert (not recovery) |
Sends an HTTP POST request to a URL of your choice with a JSON payload.
Configuration:
- URL — the endpoint to POST to
-
Secret — optional HMAC-SHA256 signing secret; the signature is sent in
X-Piro-Signature -
Headers — optional key/value headers (e.g.
Authorization: Bearer <token>) - Custom Body — override the default JSON payload with a Mustache template
Default payload:
{
"alert_name": "{{alert_name}}",
"alert_for": "{{alert_for}}",
"alert_status": "{{alert_status}}",
"alert_severity": "{{alert_severity}}",
"alert_timestamp": "{{alert_timestamp}}",
"is_resolved": {{is_resolved}},
"is_triggered": {{is_triggered}}
}Sends an email notification via the SMTP server configured in your environment variables.
Configuration:
- To — recipient address(es), comma-separated
-
From — sender address (overrides
SMTP_FROMenv var if set) - Custom HTML Template — full HTML email body with Mustache variables. Leave empty for the built-in template.
Required environment variables: see Environment Variables → SMTP section.
Sends a message to a Slack channel via an Incoming Webhook URL.
Configuration:
- Webhook URL — the Slack Incoming Webhook URL
- Custom Payload — override the default Slack Block Kit JSON. Supports Mustache variables.
How to get a Webhook URL:
- Go to api.slack.com/apps → create or open your app
- Navigate to Incoming Webhooks → toggle on → Add New Webhook to Workspace
- Select a channel and copy the generated URL
Sends a message to a Telegram chat via the Bot API.
Configuration:
-
Bot Token — obtained from
@BotFatheron Telegram - Chat ID — the target chat, group, or channel ID
- Custom Message Template — plain text / Markdown v1 message. Supports Mustache variables. Leave empty for the built-in alert format.
How to get a Bot Token:
- Open Telegram and start a chat with
@BotFather - Send
/newbotand follow the prompts - Copy the token (format:
123456:ABC-DEF1234...)
How to get your Chat ID:
- For a personal chat: start a chat with
@userinfobot— it replies with your numeric ID - For a group: add
@userinfobotto the group; it replies with the group ID (negative number, e.g.-1001234567890) - For a channel: use the channel username prefixed with
@(e.g.@mychannel) or the numeric ID
Note: Make sure to add your bot to the target group/channel and grant it permission to post messages.
Sends alerts to PagerDuty via the Events API v2.
Configuration:
-
Integration URL — the Events API v2 endpoint (usually
https://events.pagerduty.com/v2/enqueue) - Routing Key — the 32-character integration key from your PagerDuty service
How to get a Routing Key:
- In PagerDuty, go to Services → select your service → Integrations
- Add an integration → select Events API v2
- Copy the Integration Key
Future — Microsoft Teams support is planned but not yet implemented.
Will send an Adaptive Card to a Teams channel via an Incoming Webhook.
Planned configuration:
- Webhook URL — the Teams Incoming Webhook URL
How to get a Webhook URL (for when this is available):
- In Teams, go to the channel → ... menu → Connectors
- Find Incoming Webhook → Configure
- Give it a name and copy the generated URL