Skip to main content

Delete old graphite data based on instance name patternand current running AWS instances.

Project description

Delete old graphite data based on instance name pattern and current running AWS instances.

This is very useful if you have AWS instances that are terminated and you no longer need their metrics, so you can just remove their stats.

It is required to have AWS credentials set via environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) or IAM roles.

Installation

$ pip install graphite_aws_cleaner

Usage

# aws context
web_i-123 # running
web_i-456 # running
web_i-789 # terminated


$ graphite-aws-cleaner '*web*' /opt/graphite/storage

This is going to delete all graphite data related to web_i-789, since the instance is no longer runnning.

Patterns

Anything that matches Python’s fnmatch.fnmatch works as a pattern:

Pattern

Meaning

*

matches everything

?

matches any single character

[seq]

matches any character in seq

[!seq]

matches any character not in seq

Development

$ make setup

Running tests

$ make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphite_aws_cleaner-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file graphite_aws_cleaner-0.0.1.tar.gz.

File metadata

File hashes

Hashes for graphite_aws_cleaner-0.0.1.tar.gz
Algorithm Hash digest
SHA256 96148bccd9ae01a7d81d5cbb815c30565f7acec62a73970db4c4afd501613a67
MD5 87707c2fa8082f1c235098dcc2c33163
BLAKE2b-256 5c1632b6ce83f245ccdbe91cad5f9cd5e7234e88b19f9d4370a9783a5857a1c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page