Skip to content

Alerts

An alert watches the output of your terminal sessions for a pattern. When a line matches, ZestSSH can tell you in the notification center, play a sound, and color the matching text in the terminal. Use one to hear when a long build finishes, to spot errors scrolling past, or to see a password prompt waiting in a tab you are not looking at.

“Alerts watch every line of terminal output, with colors stripped.” The pattern is matched against the text you see, not the escape codes a server sends with it.

Earlier versions called these terminal triggers. They are not the same as a network’s triggers, which decide which network you are on.

  • Computer: Alerts in the side rail, under Utilities. The list is on the left and an alert’s editor on the right.
  • Phone or tablet: More > Alerts (“Alert or highlight on output patterns”).

Alerts sync with the rest of your data when you use sync, so an alert made on one device works on your others.

  1. Open Alerts and click New alert.

  2. In Simple mode, under Alert me when output shows, pick one:

    • Errors: lines with “error”, “failed” or “fatal”.
    • Warnings: lines with “warn” or “warning”.
    • Build finished: “build succeeded”, “build successful”, “build finished” or “build complete”.
    • Password prompt: a line that ends in a password question, such as [sudo] password for deploy:.
    • Your own text: type it under Text (for example Connection refused). It is matched as written: no character in it has a special meaning.

    Matches lines like shows example lines the choice matches. Upper or lower case makes it match whatever the case.

  3. Give it a Name (a preset fills one in).

  4. Optional: under Try it on a line of output, paste a line to see whether it Matches or gets No match, with the matched part marked.

  5. Under When it matches, choose what happens:

    • Notify me: a notice in the notification center.
    • Play a sound: with the notice (it needs Notify me).
    • Highlight in terminal: colors the matching text, in the color you pick.

    You need at least one of Notify me and Highlight in terminal (“Pick at least one action.”). At most once per says how often one alert tells you: “10 seconds, for the same line”, so a stack trace full of errors does not send a hundred notices.

  6. Under Where, Watch All hosts or one saved host.

  7. Click Save alert.

Regex mode takes a regular expression of your own under Pattern (“Matched against each output line, with escape codes stripped.”), with Case sensitive, for example \b(error|failed)\b (the placeholder the field shows). Edit as regex in Simple mode moves a preset’s pattern there to change it. A pattern may start with inline flags as other tools write them, such as (?i) to ignore case.

Filter alerts searches the list, and All, On and Off (each with its count) show the alerts in that state. Each alert shows where it watches (All hosts or the host’s name), chips for what it does (Notify, Sound, Highlight, with the highlight’s color), and, once it has matched since the app started, how often and when (“12× · 5m ago”). Right-click an alert, or use its three dots, for Edit, Disable or Enable, and Delete.

  1. Open More > Alerts and tap New alert.
  2. Fill in Name and Pattern (regular expression), and turn Case sensitive on or off.
  3. Choose at least one of Notify me (“Raise an alert in the notification center”), Play a sound and Highlight in terminal (“Color the matching text where it appears”).
  4. Under Applies to, pick All hosts or one host. Enabled turns the alert on or off.
  5. Save it.

With no alerts yet, Add examples adds three to start from:

NamePatternDoes
Error(?i)\b(error|failed|fatal)\bNotifies and highlights in red
Build finished(?i)(built in|build (succeeded|successful|finished|complete|done)|compiled successfully)Notifies with a sound
Warning(?i)\bwarn(ing)?\bHighlights in yellow

Each alert in the list has a switch to turn it on or off; tap it to edit, or use its menu for Edit and Delete.

On a phone, Play a sound is “Played with a notification, so notifications must be allowed on this device.” On Android, these notifications have their own channel, Terminal alerts. A system notification names the alert, not the line that matched. See Notifications.

  • Keep patterns specific. error also matches 0 errors. Use word boundaries (\berror\b) or a longer phrase.
  • Scope an alert to one host when its pattern only makes sense there, for example a deploy message on a build server.
  • Highlight without notifying for things you want to see but not be told about, such as warnings.
  • Notifications: the bell, its history and the system notifications.
  • Server monitor: alerts about a host’s CPU, memory and disks, rather than what a terminal prints.
  • Workflows: run commands in a row and be told when they finish.