Skip to main content

# cwtune

## Description

cwtune is an open-source tool developed by [availabl.ai](https://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.

## Requirements - [aws cli](https://aws.amazon.com/cli/) - python 3.6+

## Installation

You can install cwtune via pip:

`bash pip install cwtune `

## Usage

After installation, you can run cwtune from the command line:

`bash 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:

`bash 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 be 1, 5, or 60.

  • –statistic: The statistic of the CloudWatch metric. Can be Sum, Average, Min, Max, SampleCount, p50, p95 or p99.

  • –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 to default.

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:

`bash cwtune --alarm-type gt --period 1 --statistic Sum --region us-west-1 --aws-profile default `

## Example Plot <img width=”1544” alt=”Screen Shot 2023-08-02 at 15 48 45 p m” src=”https://github.com/availabl-co/cwtune/assets/89125058/1dd56b83-36c4-46d2-a40e-f29cfb657fdb”>

## Contributing

We welcome contributions from the community! If you would like to contribute, please follow these steps:

  1. Fork the repository on GitHub.

  2. Make your changes in a new branch.

  3. Test your changes to ensure they do not introduce new bugs.

  4. Submit a pull request for review.

## License

cwtune is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Release files for cwtune 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cwtune 0.2.2
File Size Uploaded
cwtune-0.2.2.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cwtune 0.2.2
File Interpreter ABI Platform
cwtune-0.2.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 24.2 kB

Release files / cwtune-0.2.2.tar.gz

Download URL cwtune-0.2.2.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9684f8edddd4ce25949a0816fe70ea005c64751cb4593a7fe3b58cc002c95c2c
BLAKE2b-256 checksum
How to use checksums
46b586b15e7dbebaa0888abe2dc558025a9de6e7d5c4b7c61d406b1ac1ce0602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.9.6 requests/2.31.0 setuptools/67.6.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.11.3

Release files / cwtune-0.2.2-py2.py3-none-any.whl

Download URL cwtune-0.2.2-py2.py3-none-any.whl
Size 12.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fa60518d7d93c504fc8a809741e691a77864f16f87ba396edc2169f1bcddc78e
BLAKE2b-256 checksum
How to use checksums
1b9a10006513281a93e97688e5d21b94aadc433f35f92dd0126462b2ad19385d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.9.6 requests/2.31.0 setuptools/67.6.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page