Skip to content
Notifications

Notifications

Composia sends notifications for task results, backup events, image updates, and node status changes. Three notification channels are supported: Alertmanager, SMTP, and Telegram.

Configuration

All channels are configured in the controller config under notifications:

controller:
  notifications:
    alertmanager:
      enabled: true
      listen_path: "/api/v1/alerts"
    smtp:
      enabled: true
      host: "smtp.example.com"
      port: 587
      encryption: starttls
      username: "alerts@example.com"
      password: "REPLACE"
      from: "alerts@example.com"
      to:
        - "admin@example.com"
      on:
        - task_failed
        - backup_failed
      task_sources:
        - web
        - cli
    telegram:
      enabled: true
      bot_token: "REPLACE"
      chat_id: "REPLACE"
      on:
        - task_completed

Event types

The following notification event types are available:

EventTrigger
task_failedAny task ends with status failed.
task_cancelledA task is cancelled before completion.
task_completedA task finishes successfully.
task_awaiting_confirmationA migration task reaches the confirmation step.
backup_completedA backup task or scheduled backup finishes successfully.
backup_failedA backup task or step fails.
image_update_availableAn image check discovers a new version.
image_update_appliedAn image update is applied.
node_offlineA node stops sending heartbeats.
node_onlineA previously offline node resumes heartbeats.
alertmanager_alertAn Alertmanager alert is received when the controller is configured as an Alertmanager webhook receiver.

Each channel can filter which event types it should handle using the on list. An empty on list delivers all event types.

Task source filters

SMTP and Telegram channels support filtering by the source that triggered a task:

SourceDescription
webActions triggered through the web UI.
cliActions triggered through the CLI.
othersOther sources.
scheduleScheduled tasks (backups, maintenance).
systemSystem-generated tasks.
auto_deployTasks generated by auto-deploy triggers.

When task_sources is empty, notifications are sent for all source types.

Alertmanager

The controller runs an embedded Alertmanager webhook receiver. When enabled, the receiver listens on the configured path:

alertmanager:
  enabled: true
  listen_path: "/api/v1/alerts"
KeyTypeDescription
enabledboolEnabled by default when the section exists.
listen_pathstringHTTP path to receive Alertmanager webhooks. Defaults to /api/v1/alerts. Must start with / and contain no whitespace.

Point your Alertmanager instance at the controller’s address with this webhook URL. Alerts are forwarded to configured notification channels according to their event filters.

SMTP

SMTP delivers notifications by email:

KeyTypeRequired when enabledDescription
enabledboolNoEnabled by default when the section exists.
hoststringYesSMTP server hostname.
portintYesSMTP port. Must be between 1 and 65535.
encryptionstringNonone, starttls, or ssl_tls. Defaults to starttls.
usernamestringNoSMTP authentication username.
passwordstringNoSMTP password.
password_filestringNoRead password from a file.
fromstringYesSender address.
to[]stringYesRecipient addresses.
on[]stringNoEvent types to notify on.
task_sources[]stringNoTask source filters.

Telegram

Telegram sends notifications to a chat through a bot:

KeyTypeRequired when enabledDescription
enabledboolNoEnabled by default when the section exists.
bot_tokenstringYesTelegram bot token from BotFather.
bot_token_filestringNoRead bot token from a file.
chat_idstringYesTarget chat ID.
on[]stringNoEvent types to notify on.
task_sources[]stringNoTask source filters.
Last updated on • Renovate Bot