Skip to content

System Alerts

System Alerts tells administrators when the platform has failed at something it was supposed to do on its own - a scheduled backup that did not upload, a standby server that stopped copying data, a certificate about to expire. Each alert is listed on Platform > General Settings & Tools > Tools > System Alerts and sent by email, and optionally to a Thirdlane Connect channel, to the administrators who asked for it.

Why you would want it

Much of what keeps a phone system safe happens in the background: backups run at night, recordings are copied to S3, a standby server keeps itself in step with the active one. When one of those jobs fails, nothing on the everyday screens changes; the failure is written to a log and stays unnoticed until the backup or the standby is needed. System Alerts turns those failures into messages, so an administrator hears about a failed upload the morning after.

System Alerts covers failures inside the application. Watching the server itself - whether a service is running, whether the disk is full - is the job of a process monitor. The platform’s own monitoring service (Monit, shown on Status > Services Status > Monitoring) is connected already: a service, filesystem or resource it reports as failing becomes a System Alert. Other monitors can be connected too; see Raising alerts from scripts.

How it works

One alert per problem

Each alert is about one problem on one thing: the S3 upload of backups, the certificate for pbx.example.com, the server worker2. While that problem continues, repeated failures update the same alert instead of opening new ones. The screen shows how many times it has been seen and when it was first and last seen.

When the condition clears - the next upload succeeds, the certificate is renewed - the alert is resolved automatically.

Severity

  • Critical - something that protects your data or your service is not working. A failed backup, a standby that is not replicating, an invalid license.
  • Warning - something needs attention soon or is partly working. A certificate expiring within two weeks, a server that is not applying configuration changes.
  • Info - something you should know about that is not a fault, such as a standby server being promoted to active.

Some alerts change severity as they get closer: a certificate is a warning with fewer than 7 days left and becomes critical with fewer than 3.

When you are told

Alerts are checked and sent every five minutes. For each alert, a message goes out:

  • when it is opened,
  • when its severity rises (a warning becomes critical),
  • as a reminder every 24 hours while it is still open, unless someone has acknowledged it,
  • when it is resolved, so you know you can stop looking.

Info alerts are sent once, with no reminder and no resolve message. An alert that opens and clears before the next five-minute check is recorded but not sent.

Some failures are normal once in a while. Copying recordings to S3 raises an alert only after errors in three runs, so a single network hiccup does not send a message.

What raises an alert

AreaAlertSeverityResolves when
BackupThe backup archive could not be createdCriticalThe next backup succeeds
BackupThe backup could not be uploaded to FTP or S3CriticalThe next upload to that destination succeeds
BackupNo successful backup in more than twice the scheduled intervalWarningA backup succeeds, or scheduled backups are turned off
Configuration syncA server is more than 5 changes behind and has not applied any for 15 minutesWarningThe server catches up
Configuration syncChanges have been waiting more than 15 minutes to be applied (single-server systems)WarningThe queue empties
RedundancyThe standby is not replicatingCriticalReplication is healthy again
RedundancyServices on the standby could not be stoppedCriticalThey are stopped
RedundancyThe active server could not capture files or configuration for the standbyWarningThe next capture succeeds
RedundancyThe standby could not apply files or configuration from the active serverWarningThe next restore succeeds
RedundancyA server was promoted to activeInfoResolve it by hand once noted
CertificatesA certificate expires within 7 daysWarning, critical within 3 daysThe certificate is renewed
LicenseThe license is not validCriticalThe license is valid
LicenseThe license expires within 30 daysWarning, critical within 7 daysThe license is renewed
LicenseMaintenance expires within 30 daysInfoMaintenance is renewed
File storageRecordings could not be copied to S3 in three runsWarningA run uploads without errors
MonitA service, filesystem or resource Monit watches is not OKCritical when a process, program or remote host does not exist or has failed; Warning otherwiseMonit reports it OK again

The certificate check covers the certificates the system renews automatically and the certificate served for the system’s own hostname. Certificate and license checks run once a day; the others run every five minutes or at the moment the failure happens.

Servers that have never applied a change, standby servers and retired servers are not checked for configuration sync.

Monit’s status is read every five minutes, the same status shown on the Monitoring tab of Status > Services Status. Each Monit alert names the server and the service, so the same service failing on two servers is two alerts. A service Monit is not monitoring is left out, and while Monit itself is not running nothing is opened or resolved.

Who receives alerts

Alerts are delivered to administrator records - the accounts listed under Platform > Admins & Resellers > Admins - and only to those that meet every condition below. An administrator who does not still sees every alert on the System Alerts screen, but is not sent anything.

For email:

  1. Scope includes system management - All Organizations and system management on a multi-organization server, Everything including system management on a single-organization one - with the Can manage Global System Preferences? permission left ticked. These are the administrators who can open the System Alerts screen, so nobody is told about an alert they cannot then review.
  2. Email is filled in on the record.
  3. Email notifications is ticked.
  4. Email Delivery is set up. Alerts go out through it like every other message the platform sends.

For Thirdlane Connect:

  1. Scope includes system management, as above.
  2. Thirdlane Connect user is filled in: tenant-extension on a multi-organization server, for example t100-101, or just the extension on a single-organization one.
  3. Thirdlane Connect notifications is ticked.
  4. That user signs in to Connect, where the alerts appear in the #System Alerts channel.

An administrator can use either method or both.

The built-in root login is not listed under Admins, so it has no record to hold an email address or notification settings and never receives alerts. If you sign in as root, set up notifications on another administrator, such as admin.

When no administrator meets these conditions, the Manager says so in three places: in a message after you save an administrator, at the top of the System Alerts screen, and in the Dashboard bar when alerts are open. Only administrators who can manage Global System Preferences see these messages. Alerts are not marked as sent while nobody can receive them, so the first administrator to be set up is told about everything already open.

The Connect channel

Thirdlane Connect does not show direct messages from senders who are not in the recipient’s contacts, so alerts are posted to a private channel instead. The channel is named #System Alerts and is created automatically, in the organization of the Connect user, the first time an alert is sent there. Administrators who turn on Connect notifications later are added to it at the next alert.

Turning the setting off stops nobody from reading the channel - remove the user from the channel’s members if they should no longer see it.

The email

Alert emails use the System Alert template under Email Templates. It can be edited like any other template; its variables are listed under System alert variables.

Using the System Alerts screen

The screen lists open alerts by default, most severe first, with Severity, Status, Alert, Details, Count, First Seen, Last Seen and Handled. Filter by Status (Open, Resolved, All) and Severity. Hold the pointer over an alert’s title to see its details, or double-click the alert to see everything recorded about it. Select alerts and use:

  • Acknowledge - says someone is dealing with it. The daily reminder stops; a rise in severity and the resolve message are still sent. The screen records who acknowledged it and when.
  • Resolve - closes the alert by hand. Use it for an alert whose condition no longer applies but that the system cannot check again, such as a failed backup upload to a destination you have since removed. If the condition is still there, the next check opens a new alert.

When any critical or warning alert is open, the Dashboard shows a bar with the count and a link to this screen.

On a standby server

A standby server keeps its own alerts - for example, that it cannot apply what the active server sends - and emails them from the standby. They are listed on the standby’s System Alerts screen but cannot be acknowledged or resolved there; they resolve when the condition clears. Connect messages are sent only from the active server.

From another system

A management or monitoring system can list, acknowledge and resolve these alerts through the System Alerts REST API (GET /api/system_alerts, POST /api/system_alerts/acknowledge, POST /api/system_alerts/resolve). Acknowledging or resolving an alert there changes it here, recorded with the name of the person who did it, so reminder emails and the Dashboard bar follow. The API key it uses must belong to an administrator who can manage Global System Preferences. Alerts kept on a standby server are not included.

Raising alerts from scripts

Anything that runs on the server - a process monitor, a cron job, a site script - can raise and resolve alerts with the tl-alert command. They are delivered and listed like the platform’s own.

Raise an alert:

Terminal window
tl-alert raise --event external.disk_mirror --key md0 --severity critical --title "Disk mirror md0 is degraded" --details "sdb1 failed"

Resolve it when the condition clears:

Terminal window
tl-alert resolve --event external.disk_mirror --key md0

Names for your own alerts start with external. and use lower-case letters, digits, dots, dashes and underscores. The default severity is warning, and the title defaults to the event name. Raising the same event and key again updates the open alert instead of opening another one, so a script can raise on every failed check and resolve on every good one.

tl-alert list shows open alerts; tl-alert list --all includes resolved ones.

Best practices

  • Turn on email notifications for at least two administrators, so an alert does not wait for someone who is away.
  • Acknowledge what you are working on. It stops the reminders and tells other administrators someone has it.
  • Fix the cause rather than resolving by hand. An alert whose condition is still there comes back at the next check.
  • Connect any other process monitor by calling tl-alert from its actions, so its checks reach the same people.