Skip to content

Triggers

Arael Espinosa edited this page Jul 13, 2026 · 2 revisions

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)

Email

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_FROM env 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.


Telegram

Sends a message to a Telegram chat via the Bot API.

Configuration:

  • Bot Token — obtained from @BotFather on 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:

  1. Open Telegram and start a chat with @BotFather
  2. Send /newbot and follow the prompts
  3. 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 @userinfobot to 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.


Twilio SMS

Sends a text message via Twilio's Programmable Messaging API.

Configuration:

  • Account SID and Auth Token — from your Twilio Console
  • From Number — the Twilio phone number to send from
  • To — recipient phone number(s)
  • Custom Message Template — plain text. Supports Mustache variables. Leave empty for the built-in format.

How to get credentials:

  1. Sign in to the Twilio Console
  2. Copy the Account SID and Auth Token from the dashboard
  3. Purchase or use an existing Twilio phone number as the From Number

Microsoft Teams

Not currently supported. The integration type exists in the schema but dispatch was never implemented — configuring it will not actually send anything. Support may be added in a future release.


Opsgenie

Sends an alert to Opsgenie via its Alerts API.

Configuration:

  • API Key — an Opsgenie integration API key (Team or API integration type)
  • Custom Payload — override the default alert payload. Supports Mustache variables.

How to get an API Key:

  1. In Opsgenie, go to Teams (or Settings) → Integrations
  2. Add a new API integration
  3. Copy the generated API Key

Pushover

Sends a push notification to your devices via Pushover.

Configuration:

  • User Key — your Pushover user key
  • API Token — the application token for the Pushover app you registered
  • Custom Message Template — plain text. Supports Mustache variables.

How to get credentials:

  1. Sign in to pushover.net and copy your User Key from the dashboard
  2. Register a new application under Your Applications to get an API Token

Ntfy

Sends a push notification via ntfy — either the public instance or your own self-hosted server.

Configuration:

  • Server URL — defaults to https://ntfy.sh; set to your self-hosted instance if applicable
  • Topic — the ntfy topic to publish to
  • Access Token — optional, required only if the topic/server needs authentication
  • Custom Message Template — plain text. Supports Mustache variables.

How to get set up:

  1. Pick a hard-to-guess topic name (anyone who knows it can subscribe), or self-host ntfy for private topics
  2. Subscribe to the topic in the ntfy mobile app or web client
  3. Configure the same topic (and server URL, if self-hosted) in the trigger

Clone this wiki locally