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
| Flag | Description |
|---|---|
--metric-name <name> | The metric to monitor |
--kind <kind> | Trigger kind, e.g. Advanced, Performance, or HostCPUUsage |
--field <field> | Field to compare: count, counter, gauge, mean, p90, or p95 |
--comparison-operator <op> | One of >, >=, <, <=, ==, or != |
--condition-value <number> | Threshold to compare against |
--warmup-duration <minutes> | How long the condition must hold before opening an alert |
--cooldown-duration <minutes> | How long it must recover before closing an alert |
| Flag | Description |
|---|---|
--name <text> | Display name (defaults to the metric name) |
--description <text> | Description shown with the trigger |
--notifier-ids <list> | Comma-separated notifier IDs to attach |
--tag <key=value> | Tag filter (repeat the flag, or comma-separate) |
--dashboard-id <id> | Dashboard to link from notifications |
--no-match-is-zero | Treat missing datapoints as 0 |
--format <format> | Value format, e.g. duration, number, or percent |
--format-input <unit> | Input unit for size formats, e.g. byte or kilobyte |
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