Skip to content

Watch metrics and alarms with signals

A signal puts something that reports on your application onto the project page: a CloudWatch alarm, or a number such as Lambda errors, queue depth, active users, or monthly cost. Anyone who opens the project sees at a glance whether it is healthy, and agents use the same signals as their starting point when something goes wrong.

You get: the project’s important alarms and key numbers on its page, each with a live state.

Time: about 10 minutes.

  • Alarms are CloudWatch alarms. Their state comes from CloudWatch.
  • Metrics are numbers: a CloudWatch metric, the users in a Cognito user pool, or AWS cost for the month. A metric with warning and critical thresholds gets a state and counts toward the project’s health. A metric without thresholds is shown as a key number.
  • Every signal has a state: OK, WARNING, FIRING, NO_DATA, or UNKNOWN. It is read live from the source when someone looks. StratoNext stores only the definition, never your data.
  • Alarms that are defined in a deployment’s CloudFormation stack or Terraform code are found automatically when the deployment is discovered. You add the rest.
  • You finished Connect your cloud account and the project has at least one deployment.
  • Your agent is opened in the project’s repository folder.
Using the StratoNext skill, set up signals for this project.
1. List the signals the project already has, with their current status.
2. Look at the project's deployments and their resources, and the alarms and metrics available in the environment. Propose the 5 to 10 signals that matter most for this application: its existing CloudWatch alarms, error and latency metrics for its APIs and functions, queue depth for its queues, and monthly cost. Suggest warning and critical thresholds for each metric, based on its recent values.
3. Show me the list and wait for my confirmation before adding anything.
4. Add the signals I approve, then show me the project's signals with their status.

The agent runs every step below for you. Nothing here is for you to type. Expand a step to see examples of the commands it might run. The exact calls depend on what it finds in your setup.

1. Reads what is already there.

Example commands the agent might run
Terminal window
stratonext signal list --status

2. Finds what can be watched. Candidates come with the exact configuration to register them:

Example commands the agent might run
Terminal window
stratonext signal candidates --environment-id <environment_id> --source CLOUD_WATCH_METRIC --search AWS/Lambda
stratonext signal candidates --environment-id <environment_id> --source CLOUD_WATCH

3. Registers the signals you approve. upsert is safe to repeat: running it again updates the signal instead of creating a duplicate.

Example commands the agent might run
Terminal window
# An existing CloudWatch alarm
stratonext signal upsert --deployment-id <deployment_id> \
--external-id arn:aws:cloudwatch:us-east-1:123456789012:alarm:orders-api-5xx \
--name "Orders API 5xx rate"
# Lambda errors: WARNING above 3 and FIRING above 10 per 5 minutes
stratonext signal upsert --deployment-id <deployment_id> --source CLOUD_WATCH_METRIC \
--config namespace=AWS/Lambda --config metric=Errors \
--config dimensions=FunctionName=orders-api --config statistic=Sum --config unit=errors \
--warning 3 --critical 10 --name "Orders API errors"
# Queue depth that matters when it drops, such as a stalled producer
stratonext signal upsert --deployment-id <deployment_id> --source CLOUD_WATCH_METRIC \
--config namespace=AWS/SQS --config metric=ApproximateNumberOfMessagesVisible \
--config dimensions=QueueName=orders --warning 100 --critical 10 --direction BELOW \
--name "Orders queue depth"
# Monthly spend for the project's tagged resources, as a key number
stratonext signal upsert --environment-id <environment_id> --source AWS_COST \
--config tagKey=Project --config tagValues=orders --name "Monthly cost"
# Active users in a Cognito user pool
stratonext signal upsert --environment-id <environment_id> --source COGNITO_USERS \
--external-id us-east-1_AbC123 --name "Users"

Use --deployment-id for a signal that watches one deployment, and --environment-id for one that spans the whole project, such as cost or an SLO.

Terminal window
stratonext signal list --status

Open the project in the web app: the signals are on its homepage. To change a threshold later:

Terminal window
stratonext signal update <signal_id> --warning 5 --critical 20

Ask your agent to investigate it, and to track the work as a task:

Using the StratoNext skill, find the signals that are firing in this project, create a task to investigate the most severe one, and tell me the likely cause.

The agent reads the state and CloudWatch’s own reason with stratonext signal get <signal_id>, then follows the deployment’s resources to the cause.

Automate a recurring report so an agent keeps an eye on the project for you.