Skip to main content
The triggers commands manage anomaly detection triggers: alerts that fire 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

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 creates a new version linked to the existing trigger:
Shell
update accepts the same flags as create.

Archive a trigger

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

Next steps

A trigger opens an incident when it fires. Inspect those with the incidents commands.