stacktape alarm list shows the CloudWatch alarms of a deployed stage and their current state, so you can see what is firing without opening the AWS console. It lists the alarms whose names start with the stack name, such as the alarms your config defines. It needs AWS credentials and works without a Stacktape account.
Usage
For each alarm you get its name, the Stacktape resource it belongs to, its state, the metric, threshold and comparison, and when the state last changed. A firing alarm also shows why.
| State | Meaning |
|---|---|
OK | The metric is within the threshold. |
ALARM | The metric crossed the threshold for the required number of periods. |
INSUFFICIENT_DATA | Not enough data yet, common for a new alarm or a resource without traffic. |
Filter by resource or state
Firing alarms of one resource:
--resource-name takes the resource name from your config. --state takes OK, ALARM or INSUFFICIENT_DATA.
Check from a script
With --agent, the command prints NDJSON: one JSON object per line. The list arrives as JSON text in the message of a log line, as { "alarms": [...] }, and each alarm has name, resource, state, metric, threshold, comparison, lastUpdated and, when firing, reason. This prints how many alarms are firing:
Legacy alarm rules that were created in the Console, not in your config, move into the config with alarm export.
Options
stacktape alarm list10 optionsThe AWS region for the operation.
For a list of available regions, see the AWS documentation.
Inside a project whose config declares
region, the flag is optional and overrides the config.21 allowed values:us-east-2us-east-1us-west-1us-west-2ap-east-1ap-south-1Show all
ap-northeast-3ap-northeast-2ap-southeast-1ap-southeast-2ap-northeast-1ca-central-1eu-central-1eu-west-1eu-west-2eu-west-3eu-north-1me-south-1sa-east-1af-south-1eu-south-1The stage for the operation (e.g.,
production,staging,dev-john).You can set a default stage using the
defaults setcommand. Stage names use lowercase letters, numbers and dashes, with at least 2 characters. The project name, a dash and the stage form the CloudFormation stack name, which can have at most 128 characters. Stacktape shortens an AWS resource name that would be too long and adds a hash.--aws-accountstringThe name of the AWS account to use for the operation.
The account must first be connected in the Stacktape Console.
Without it, the account is chosen by
--profile,AWS_PROFILEor AWS credentials in environment variables, then by your saved default, then by your organization's only connected account.--aws-accounttakes precedence over all of them, but AWS credentials in environment variables must then belong to that account.-h, --helpstringIf provided, the command will not execute and will instead print help information.
--log-level"info" | "debug" | "error"Log Level
The level of logs to print to the console.
info: Basic information about the operation.error: Only errors.debug: Detailed information for debugging.
-p, --profilestringThe AWS profile to use for the command.
You can manage profiles using the
aws-profile:*commands and set a default profile withdefaults set.For commands that use a connected AWS account,
--profile(orAWS_PROFILE) selects the connected account the profile belongs to, unless--aws-accountis set. The command fails if that account is not connected.--projectstringThe name of the Stacktape project for this operation.
Commands that target a stack take it from
projectNamein the project's config when the flag is absent.--quietbooleanHide progress, banners, success messages and hints.
Command output, warnings and errors are still printed.
--resource-namestringThe name of the resource as defined in your Stacktape configuration.
--statestringFilter alarms by state: OK, ALARM, or INSUFFICIENT_DATA.
No option matches.
Related commands
metricsshows the metric behind an alarm over time.logsshows the requests and errors behind it.alarm exportmoves legacy Console alarm rules into your config.