Skip to main content

Automations

Run steps on your hosts on a schedule or when something happens.

InfrastructureSourceAPIChangelog
  • Triggers for metrics, hosts going up or down, health checks, schedules, container events, alerts and webhooks
  • Steps that run commands and snippets, control containers and tunnels, wake hosts, call URLs and send alerts
  • Conditions, waits and variables for more complex flows
  • Run on one host, a fleet or every host
  • Test runs and a history of every run
  • Maintenance windows that pause automations while you work on a host
  • An automations panel beside any SSH terminal, plus upcoming and recent run dashboard cards

Automations run steps on your hosts when something happens. Restart a service when it stops answering, clean up a disk when it fills, wake machines in the morning, or send yourself an alert when a container dies.

An automation is one trigger and a list of steps. The trigger says when it runs. The steps say what it does.

Make one​

  1. Open Automations from the sidebar and press New Automation.
  2. Give it a name and pick a trigger.
  3. Add steps with Add step.
  4. Press Test run to try it. A test run goes through every step but doesn't touch anything outside Termix.
  5. Turn on Enabled and save.

You can build an automation with the form, see it as a graph, or edit the JSON directly.

Runs​

The Runs list shows every run: what started it, how long it took, whether it worked, and each step's output. Run now starts one by hand.

If it is already running decides what happens when the trigger fires again before the last run is done: skip the new run, wait and run after, or run both at once.

On the dashboard and beside a terminal​

Add the Upcoming automations and Automation runs cards in the dashboard's edit mode. The first lists scheduled automations by when they run next, the second the latest runs.

The Automations panel beside an SSH terminal shows that host's maintenance state, the automations that use the host, and their latest runs. Open it from the terminal edge or its tab menu. Turn it off for a host with Panel beside the terminal.

Maintenance​

Doing work on a host? Open its Maintenance settings and press Start now, or schedule a window once, weekly or monthly. While a host is in maintenance, automations that watch its status, health checks, metrics, containers and tunnels don't fire for it. Scheduled automations and manual runs still work.

An estimate doesn't end maintenance on its own. Press End maintenance when you are done. Turn on the notice to get one alert if the host is still down after the estimate and a grace period.

What it needs​

Automations works on its own for schedules, webhooks, commands and alerts. Other triggers and steps need their plugin:

Trigger or stepNeeds
Metric threshold, health checkHost Metrics
Container event, control a containerDocker
An alert comes inAlerts 1.4.0
Control a tunnelTunnels
Wake a hostWake-on-LAN
A fleet as the targetFleets
Run a snippetSnippets
Ask AIAI Assistant

The editor only offers what is available. If a plugin an automation needs is turned off later, the automation shows Needs and its runs are skipped until the plugin is back.

Alerts go to your Alerts inbox, and on to any channels you pick.

Permissions​

PermissionWhat it allows
automations.viewSee automations and their runs.
automations.create, automations.edit, automations.deleteChange them.
automations.runStart one by hand.

Each automation runs as the person who owns it, with their permissions. It can only touch hosts they can.