The cw-alarm-audit CLI tool provides a straightforward way to audit CloudWatch alarms across multiple AWS regions. It identifies issues such as alarms without actions, disabled actions, and those stuck in undesirable states. This read-only utility ensures that alarm configurations are effective and reliable, enhancing monitoring and alerting practices.
The AWS CloudWatch Alarm Audit CLI is a lightweight, read-only command-line interface designed to efficiently audit CloudWatch alarms across multiple AWS regions. It serves to identify various issues within alarm configurations that might affect monitoring effectiveness and system reliability.
This utility helps in detecting CloudWatch alarms that have issues such as:
To execute the CLI, run the following command in your terminal:
go run .
The tool provides several usage options, such as:
# Identify broken alarms across all regions (including no actions, disabled actions, and stale states over 7 days)
go run . --only-broken --stale 7d
# List alarms currently in ALARM state for a specific region (outputs in JSON format)
go run . --regions eu-west-1 --state ALARM --json
# Find alarms that do not take any actions when triggered
go run . --no-actions --actions-disabled
By default, the tool outputs a table with relevant details, including:
For those requiring structured data, the --json flag can be used for JSON output.
Ensure that the following permissions are granted to utilize this tool effectively:
cloudwatch:DescribeAlarmsec2:DescribeRegionsThe tool operates in a read-only mode, meaning it does not make any changes to alarms, does not auto-fix issues, and doesn't create dashboards. This ensures that audit processes align with best practices without risk to existing configurations.
No comments yet.
Sign in to be the first to comment.