10.4 Notifications
Notifications report failures, warnings, and changes of state without anyone having to open the web interface. They consist of two parts: channels (where the message goes: mail, Telegram, webhook, and so on) and rules (which events a channel receives). Only admins manage both, on the Notifications page.
The page shows the Channels table at the top left (columns Name, Type, Target, Last test), the Rules matrix below it, and the Delivery log on the right.
Creating a channel
Open Notifications and click Add channel.
Enter a label under Name (at most 80 characters, for example "Admin mail") and choose the Type. The type cannot be changed later.
Fill in the fields of the type (see below). Fields with secrets (passwords, tokens, webhook URLs) are stored encrypted and never shown again.
Leave Enabled checked and click Add channel. The message "β¦ created" confirms the save.
Click Test in the channel table. The server sends a test message; the result appears in the Last test column ("sent" or the error message) and in the delivery log.
In the Rules matrix, tick the events the channel should receive (see below). A channel without a rule receives nothing.
Channel kinds and their fields
Common to all kinds:
Field | Effect | Default |
|---|---|---|
Name | Display name of the channel in table, matrix, and log; at most 80 characters. | β |
Type | Kind of channel: E-mail (SMTP), Webhook, ntfy, Gotify, Discord, Telegram, Pushover, or Matrix. Locked after creation. | Webhook |
Enabled | Disabled channels receive nothing but keep their rules. Can also be toggled with the checkbox before the name in the table. | on |
When editing, stored secrets are kept as long as the field stays empty ("stored, leave empty to keep"). Every delivery aborts after 60 seconds (connection setup 10 seconds, HTTP response 30 seconds); the error appears in the delivery log. Secrets are removed from error messages.
E-mail (SMTP)
Field | Effect | Default |
|---|---|---|
SMTP server | Host name of the mail server. Required. | β |
Security | STARTTLS (587): the connection is encrypted with STARTTLS. TLS (465): encrypted from the start (implicit TLS). none (25): unencrypted. | STARTTLS |
Port | Port of the mail server. Empty: the default port of the chosen security (587, 465, or 25). | empty |
User | Login name at the mail server. Empty: no login. | empty |
Password | Password for the user (secret). | β |
From | Sender address, a name is allowed ( | β |
To | Recipients, comma separated. At least one, all must be valid addresses. | β |
The subject of the mail is the title of the message. Reports (see section 10.3 Reports) arrive as mail with a text and an HTML part, all other messages as text.
Webhook
Field | Effect | Default |
|---|---|---|
URL | Target URL (http or https) the server POSTs the message to as JSON. Required, secret. | β |
Headers | Additional HTTP headers, one per line as | empty |
Body | Template for the JSON body. The buttons PDC-Backup JSON, Slack, and Teams (Workflows) fill in a ready-made template; Custom indicates that the text was edited by hand. Empty: the default format below. | empty |
In the template the server replaces the placeholders {{title}}, {{message}}, {{severity}}, and {{event}} with the values of the message, JSON-escaped. After replacement the template must be valid JSON; otherwise the form rejects it ("The body template is not valid JSON."). Without a template the server sends this object:
{
"source": "pdc-backup",
"event": "failure",
"severity": "error",
"title": "Backup failed: Daily files on pc-anna",
"message": "β¦",
"at": 1790000000,
"agent_id": "β¦",
"job_id": "β¦",
"data": { "run_id": "β¦", "kind": "backup", "status": "failed" }
}The Slack template reads:
{"text":"*{{title}}*\n{{message}}"}The Teams (Workflows) template produces an Adaptive Card with title and message and is meant for Teams Workflows webhooks. The Slack template fits Slack incoming webhooks.
ntfy
Field | Effect | Default |
|---|---|---|
Server | Address of the ntfy server (http or https). |
|
Topic | Topic the message is sent to. Required. | β |
Priority | ntfy priority for errors. Values 1 to 5 take effect; larger values are limited to 5 although the field accepts up to 10. Warnings send one level lower (at least 3), information with 3. | 4 |
Access token (Bearer) | Token for protected topics, sent as | empty |
Title, priority, and the tags pdc,<event> travel as headers, the text as the body.
Gotify
Field | Effect | Default |
|---|---|---|
Server | Address of the Gotify server (http or https). Required. | β |
Priority | Gotify priority for errors (1 to 10). Warnings send one level lower (at least 4), information with 4. | 8 |
Application token | Token of the Gotify application, in the | β |
Discord
Field | Effect | Default |
|---|---|---|
Webhook URL | URL of the Discord webhook (http or https). Required, secret. | β |
The message appears under the name "PDC-Backup" as an embed with title (at most 250 characters) and text (at most 4000 characters). The color shows the severity: red for errors, orange for warnings, green for information.
Telegram
Field | Effect | Default |
|---|---|---|
Chat ID | Target of the message: a number (chat or group ID, for example | β |
Topic ID | Number of the topic in forum groups. Optional. | empty |
Bot token | Token of the Telegram bot. Required, secret. | β |
API server | Address of the Bot API, only needed for your own Bot API servers. |
|
The text is sent without formatting (at most 4096 characters). Information arrives without a notification sound.
Pushover
Field | Effect | Default |
|---|---|---|
Application token | Token of the Pushover application. Required, secret. | β |
User or group key | Key of the recipient. Required, secret. Both secrets are stored together: to change either, enter both again. | β |
Devices | Device names, comma separated. Empty: all devices. | all devices |
API server | Address of the Pushover API. |
|
Errors and critical messages have priority 1, warnings 0, information -1 (quiet). Emergency priority 2 is never used. Titles are cut to 250, texts to 1024 characters.
Matrix
Field | Effect | Default |
|---|---|---|
Homeserver | Address of the Matrix homeserver (http or https). Required. | β |
Room ID | Internal room ID in the form | β |
Access token | Access token of the sending Matrix account (Bearer). Required, secret. | β |
The message goes into the room as a text message (m.room.message, m.text).
Events
Every message belongs to an event. The table gives the name in the interface, the identifier (for the REST API and webhook templates), the trigger, and the severity. The last three events have no label of their own in the interface and appear with their identifier.
Event | Identifier | Trigger | Severity |
|---|---|---|---|
Run failed |
| A run of any kind ends with "failed". The message names kind, job, machine, duration, error message, and snapshot. | error |
Run warning |
| A run ends with a warning. | warning |
Run succeeded |
| A run ends successfully. Successful push installs, agent updates, and uninstalls report nothing. | info |
Report (summary) |
| A daily or weekly report was created (see section 10.3 Reports). | info; warning with failures or unprotected machines |
Agent offline |
| An agent has not been connected for more than | warning |
Repository nearly full |
| The volume of a local repository or SMB share is filled to | warning |
Ransomware warning |
| A file or image backup meets the warning criteria (see section 10.5 Ransomware early warning). | critical |
Certificate expiry |
| The server certificate, the internal CA, or an uploaded web interface certificate expires in fewer than | warning |
Foreign snapshot |
| The repository holds a snapshot that no run of this server created. It is not offered for restore and is ignored by retention. | warning |
Storage quota reached |
| A machine reaches the warning threshold or the limit of its storage quota in a repository (see chapter 08 Repositories and Storage). | warning at the threshold, error at the limit |
Malware found in restore |
| The antivirus check of a secure restore found malware. | critical |
Malware found in backup |
| "Scan backup" or the antivirus check of a restore test found malware. | critical |
|
| The copy jobs onto an attached rotation drive are finished; the drive can be removed. | info |
|
| A rotation drive has not been attached for longer than the set's configured days. | warning |
|
| A protected action waits for the approval of a second admin (see section 11.3 Four-eyes approval). | warning |
The server checks the states Agent offline, Repository nearly full, Certificate expiry, and Storage quota reached every minute. Each state reports once and again only after it has gone away in between. For Repository nearly full the state ends only when usage falls two percentage points below the threshold.
Messages about runs end with a link to the run if base_url is set (see below).
Rules
The Rules matrix (hint "which events each channel receives (all jobs and agents)") has one row per event and one column per channel. A tick sends the event to the channel, immediately and without further saving. Right-clicking a row offers the same as a menu (Send to β¦, Stop sending to β¦, Copy event name).
If the general rules are not enough, the section Limited to a job or agent restricts an event to individual objects, for example the success messages of one important job to a phone:
Click Rule.
Choose the channel under Channel and Job or Agent under Scope.
Choose the job (Select jobβ¦) or agent (Select agentβ¦).
Tick the events. For jobs the choice is Run failed, Run warning, Run succeeded, and Ransomware warning; for agents all events except Report (summary) and Certificate expiry. Run failed is preselected; at least one event is required.
Click Add.
Each limited rule has a checkbox to enable or disable it and a button to delete it (right-click: Enable rule/Disable rule, Delete rule, Copy rule ID).
A rule matches if its events contain the event and a job or agent, if set, fits the message. Rules only add: a limited rule does not switch off the general rule of a channel. If several rules match for the same channel, it still receives the message only once.
Test and delivery log
The Test button in the channel table (menu: Send test message) sends a sample message through the channel, even if the channel is disabled or has no rule. The result appears in the Last test column and, in detail, in the delivery log.
The Delivery log (kept 90 days) lists every delivery with Time, Channel, Event, Subject, and Result ("sent" or the error message). Right-click offers editing the channel, sending a test, or copying subject, error, and time. A channel can be edited with the pencil icon and deleted with the trash icon; deleting also removes its rules and asks first with Keep and Delete.
Thresholds in server.toml
The triggers of the state messages and the link in the messages are in the [notifications] section of server.toml.
| Name | Required | Default | Description |
|---|---|---|---|
agent_offline_hours | 48 | An agent that has not been connected for this many hours triggers "Agent offline". 0: never. | |
repository_full_percent | 90.0 | Usage of the volume of a local or SMB repository in percent at which "Repository nearly full" triggers. | |
certificate_days | 14 | Certificates that expire in fewer than this many days trigger "Certificate expiry". | |
base_url | Address of the web interface. If set, messages about run results end with a link to the run. Empty: no link. |