Alert rules
You decide what is an alert on this server. Each Salvo warning has a type and a level; the level says whether it notifies, whether it changes the run status or whether it is only recorded. The Catalog gives each type's level for the whole server, and your rules change the level in a specific case (a job, an account, a database, a text). The floor does not let you turn off what destroys backups.
● in testing ● available in 0.7.77 cPanel and DirectAdmin.
Notifications has three tabs: Inbox (the warnings, see Notifications and monitoring), Alert rules (this page) and Channels and deliveries (how the warning arrives, below).
The levels
| Level | What happens |
|---|---|
| Error | notifies through the channels and the run ends failed |
| Warning | notifies through the channels and the run ends with warnings |
| Info | on screen only; the run is ok, with a note |
| Daily digest only | does not notify; goes grouped into the daily digest |
| Ignore | only in the Audit; stays in the run log |
The question that separates one from another: can this make the customer lose data? No new backup, a job that did not run, a full destination, integrity damage and a failed restore are Error. What needs attention but lost no data is Warning. A database, mailbox or account the customer removed is recorded once (in the history and in the Audit) and never becomes an alert; a removed database is recorded again only if it comes back, is copied and goes away again.
The Catalog
Alert rules › Catalog: each warning type, with the factory level, the level on this server, how many warnings there were in the last 30 days and the floor's lock. Click a type to change its level for the whole server: before saving, Salvo shows what that would have changed in the last 30 days (If this level had applied in the last 30 days). Restore default goes back to the factory level.
The floor (🔒): types with a lock never go below Warning. A rule can try, but it is saved limited to Warning: the warning still arrives through the channels and the run ends with warnings.
| Group | Type | Factory | Floor |
|---|---|---|---|
| Backup · databases | db.removed | Ignore (record) · once | |
| Backup · databases | db.empty | Info | |
| Backup · databases | db.listed_missing | Warning | |
| Backup · databases | db.not_read | Error | 🔒 |
| Backup · databases | db.views_unreadable | Warning | |
| Backup · databases | db.myisam_locked | Info | |
| Backup · databases | db.skipped_large | Warning | |
| Backup · accounts and files | account.backup_failed | Error | 🔒 |
| Backup · accounts and files | account.no_backup | Error | 🔒 |
| Backup · accounts and files | job.not_run | Error | 🔒 |
| Backup · accounts and files | account.removed | Ignore (record) · once | |
| Backup · accounts and files | source.read_error | Warning | |
| Backup · accounts and files | panel.api_error | Error | |
| Backup · accounts and files | run.too_long | Warning | |
| Backup · accounts and files | run.variation | Warning | |
| Backup · accounts and files | item.warning | Warning | |
| Backup · accounts and files | item.failed | Error | |
| Backup · accounts and files | part.in_copy | Info | |
mail.box_removed | Ignore (record) · once | ||
mail.mass_delete | Warning | ||
| Destination | destination.write_error | Error | 🔒 |
| Destination | destination.unreachable | Error | 🔒 |
| Destination | destination.filling | Warning | 🔒 |
| Destination | destination.almost_full | Error | 🔒 |
| Destination | destination.slow | Warning · soon | |
| Restore and tests | restore.failed | Error | 🔒 |
| Restore and tests | test.failed | Error | 🔒 |
| Restore and tests | test.passed | Info | |
| Integrity | integrity.damaged | Error | 🔒 |
| Integrity | integrity.unreachable | Warning | 🔒 |
| Integrity | journal.sample | Warning | 🔒 |
| System and security | system.channel_failing | Error | 🔒 |
| System and security | security.recovery_login | Warning | 🔒 |
| System and security | security.new_device | Warning | 🔒 |
| System and security | security.admin_locked | Warning | 🔒 |
| System and security | config.risky_change | Warning · soon | |
| System and security | license | Warning · soon | 🔒 |
| System and security | system.updated | Info |
Once: recorded once, never an alert. Soon: the type is in the catalog, but Salvo does not emit it yet.
item.warning and item.failed catch what does not fit a type, so nothing goes missing.part.in_copy (Part being copied by another run, 0.8.25) is the note when the e-mail queue and the night copy reach the same account together: the other run takes that part, and the run stays OK. With email as its own part, mail.box_removed also records, once, a mailbox deleted from an account (0.8.28). run.too_long warns when a run
takes more than twice the median of the job's last 7 good runs (with at least 3, and more than 30 minutes).
My rules
A rule says When (the conditions, all together; empty = any) and Then (the level), with the reason and the validity:
- When: Warning type, job, account (accepts
*, as inshop*), item (database, mailbox or folder), Text contains and Regular expression (for instance^view .* denied). - Advanced › Measured variation: a part's size, files, messages or duration rose or fell more than X% against
the median of the last 7 good runs. It needs at least 3; before that, no basis yet, and the condition catches
nothing. Fell 100% = reached zero. It also catches an item copied with no warning at all (type
run.variation). - Then: one of the levels.
- Reason (required; shows in the Audit and in the daily digest) and validity: 90 days, until a date or Permanent. When it expires, the warnings go back to the Catalog level and Salvo tells you once.
The most specific wins: server, then job, account and item; on a tie, the newest rule. Rules apply to the admin's channels; warnings to the account owner follow their own settings.
Saving always goes through the simulation, with this server's real warnings from the last 30 days: how many the rule would have caught, how many would change level, how many the floor held and whether another rule catches the same warnings (conflict). Warnings from before 0.7.75 show as type inferred from the text.
The list shows each rule with what it caught in 30 days and its state:
- in review: it caught no warning in 90 days (Does it still make sense?);
- expired: past its validity (Reactivate);
- conflict: catches the same warnings as another one, with another level;
- Renew gives 90 more days; See in the simulation shows what it caught.
From a warning
Create a rule from this warning, in a notification's detail or on the run's item, opens the editor with the condition already filled in (that warning's type, job, account and item); adjust what you need.
Stop warning on this account (on the MyISAM tables warning, for instance) also creates a rule: only on that account, for 90 days, at the Info level. The backup stays the same and the run still shows the warning. See the rule opens the rule created.
Export and import
Export or import downloads your rules and the edited Catalog levels as a .json file, to take to another server. The
file takes the conditions, the level and the reason; each rule's job becomes any job on the other server, and who
created each rule stays only in this server's Audit. On import, tick what goes in; each rule comes in valid for 90 days,
and the preview shows the identical ones and those that conflict with one here. Nothing changes in warnings already
received.
Channels and deliveries
The third tab, one card per channel (e-mail, Telegram, Pushover, webhook, Zabbix), with Edit to change the recipients, the SMTP or the address (0.7.78):
- I got it / It did not arrive: confirm the channel arrives (send a test and say whether it arrived); the card shows who confirmed and when. See Turn on a channel.
- The Error, Warning and Info levels that go through that channel (one click turns the whole level on or off; the event-by-event choice is in What notifies, event by event).
- The deliveries of the last 24 hours, with Resend.
- Times: the daily digest (one e-mail a day instead of one per warning; serious failures still go out right away), quiet at night (warnings wait; serious failures always arrive) and the open problem reminder: every day 09:00 (the default), every 4 h or off.
The daily digest also brings how many warnings each rule absorbed, what stayed digest only, the rules created or changed and the Catalog levels changed in the last 24 hours, and the rules that expired.
On the command line
# the Catalog and a type's level for the whole server (with the floor, never below aviso)
salvo alert-catalog [--json]
salvo alert-level --type db.views_unreadable --level informacao
salvo alert-level-restore --type db.views_unreadable
# your rules; create always shows the 30-day simulation, --apply saves
salvo alert-rules [--json]
salvo alert-rule-create --reason "old views from the previous system" --account "shop*" \
--type db.views_unreadable --level informacao --validity 90 [--apply]
salvo alert-rule-create --reason "size dropped" --job 3 --vary-metric size --vary-dir down --vary-pct 50 --level erro
salvo alert-rule-edit --rule N [same options] # --validity keep = unchanged
salvo alert-rule-delete --rule N
salvo alert-rule-renew --rule N # 90 more days
# take to another server
salvo alert-rules-export --out rules.json
salvo alert-rules-import --file rules.json [--rules 0,2] [--levels] [--apply]
# channels and times
salvo notification-channel --type email --levels failure,warning --received yes
salvo notification-schedule --digest 08:00 --quiet 22:00-07:00 --reminder daily
Levels: erro, aviso, informacao, resumo (daily digest only) and ignorar. Everything goes to the
Audit; the simulation does not, because it only reads.