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.
How signals work
Section titled “How signals work”- 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, orUNKNOWN. 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.
Before you start
Section titled “Before you start”- You finished Connect your cloud account and the project has at least one deployment.
- Your agent is opened in the project’s repository folder.
Paste this prompt
Section titled “Paste this prompt”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.What the agent does
Section titled “What the agent does”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
stratonext signal list --status2. Finds what can be watched. Candidates come with the exact configuration to register them:
Example commands the agent might run
stratonext signal candidates --environment-id <environment_id> --source CLOUD_WATCH_METRIC --search AWS/Lambdastratonext signal candidates --environment-id <environment_id> --source CLOUD_WATCH3. 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
# An existing CloudWatch alarmstratonext 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 minutesstratonext 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 producerstratonext 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 numberstratonext signal upsert --environment-id <environment_id> --source AWS_COST \ --config tagKey=Project --config tagValues=orders --name "Monthly cost"
# Active users in a Cognito user poolstratonext 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.
Check the result
Section titled “Check the result”stratonext signal list --statusOpen the project in the web app: the signals are on its homepage. To change a threshold later:
stratonext signal update <signal_id> --warning 5 --critical 20When a signal fires
Section titled “When a signal fires”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.
Next step
Section titled “Next step”Automate a recurring report so an agent keeps an eye on the project for you.