cwtune
is an open-source tool developed by availabl.ai. It addresses the issue of noisy CloudWatch alarms by providing a data-driven approach for selecting better thresholds.
Thresholds for these monitors are usually selected by trial and error, which can lead to unnecessary noise. cwtune
uses historical data to backtest and suggest optimized thresholds, ensuring your alarms are tuned to the right level. This reduces unnecessary noise and increases the value of your alerts.
- aws cli
- python 3.6+
You can install cwtune
via pip:
pip install cwtune
After installation, you can run cwtune
from the command line:
cwtune
The tool will then guide you interactively through the process of configuring your CloudWatch alarm.
Alternatively, you can provide command-line arguments to configure the alarm:
cwtune --alarm-type [gt|lt] --period [1|5|60] --statistic [Sum|Average|Min|Max|SampleCount|p50|p95|p99] --region [AWS region] --aws-profile [AWS CLI profile]
Here's what each argument does:
--alarm-type
: The type of alarm, either greater than (gt
) or less than (lt
).--period
: The period of the CloudWatch metric in minutes. Can be1
,5
, or60
.--statistic
: The statistic of the CloudWatch metric. Can beSum
,Average
,Min
,Max
,SampleCount
,p50
,p95
orp99
.--region
: The region of the CloudWatch metric. Can be any valid AWS region.--aws-profile
: (Optional) The profile configured in AWS CLI to use for making API calls. Defaults todefault
.
For example, to configure a greater than alarm with a 1-minute period, using the Sum
statistic, in the us-west-1
region, and using the default AWS CLI profile, you would run:
cwtune --alarm-type gt --period 1 --statistic Sum --region us-west-1 --aws-profile default
We welcome contributions from the community! If you would like to contribute, please follow these steps:
- Fork the repository on GitHub.
- Make your changes in a new branch.
- Test your changes to ensure they do not introduce new bugs.
- Submit a pull request for review.
cwtune
is licensed under the MIT License. See the LICENSE file for details.