Skip to main content
The triggers commands manage anomaly detection triggers: alerts that open when a metric crosses a threshold you define. Each command targets one application, by name and environment (--app "MyApp" --environment production) or by ID (--app-id <APP_ID>, the long hexadecimal app ID from appsignal-cli apps list). The --environment flag is only needed when several apps share a name, and each command uses your default organization unless you pass --org. See Apps and organizations.
These are anomaly detection triggers on metrics. For triggers built from log lines, see Logs.

List triggers

Shell
Filter the list by metric name or tags when you are reviewing a specific group of triggers:
Shell

Create a trigger

A trigger watches one metric field and opens an alert when it crosses a threshold:
Shell
These flags are required: These flags are optional:

Update a trigger

Update a trigger by its --id from triggers list. An update archives the existing trigger and creates a replacement linked to it. Pass the full trigger definition when updating. Start from the current values in triggers list, then change the fields you want to retune:
Shell
update accepts the same flags as create. Include optional values you want to keep, such as --notifier-ids, --tag, --dashboard-id, and --description.

Archive a trigger

Archiving a trigger also closes its associated alerts and incidents:
Shell

Next steps

A trigger opens an incident when the metric crosses the trigger threshold. Inspect those incidents with the incidents commands.