Skip to main content

Extract alerts configured in different sources (eg: Prometheus Rules, CloudWatch Alarms, Pingdom)

Project description

Alert Exporter

PyPI PyPI - Python Version GitHub repo size PyPI - Status

Installation

Use the package manager pip to install alert-exporter.

pip install alert-exporter

Usage

 alert-exporter --help
Extract alerts configured in different sources (eg: Prometheus Rules, CloudWatch Alarms, Pingdom)

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --log-level {DEBUG,INFO,WARNING,ERROR}
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
  --jinja-template [JINJA_TEMPLATE]
  -f {markdown,yaml,html}, --format {markdown,yaml,html}
  --prometheus
  --prometheus-filters PROMETHEUS_FILTERS
  --context [CONTEXT]
  --cloudwatch
  --aws-profile AWS_PROFILE
  --aws-region AWS_REGION
                        Specific region to target. Default: Iterate over all regions available.
  --pingdom
  --pingdom-api-key PINGDOM_API_KEY
  --pingdom-tags PINGDOM_TAGS
                        Comma separated list of tags. Eg: tag1,tag2

Multiple sources are available, one or many can be selected

Kubernetes / Prometheus

The current context is used unless you provide the --context flag.

alert-exporter -o minikube.html --prometheus --context minikube

You can filter prometheus rule to match specific labels using the '--prometheus-filters' flag.

alert-exporter -o minikube.html --prometheus --context minikube --prometheus-filters '{"severity": "critical"}'

AWS Cloudwatch

All available regions are parsed unless you provide the --aws-region flag.

You need to be authenticated before using this tool.

alert-exporter -o aws.html --cloudwatch --aws-region eu-west-1 --aws-profile profile

Pingdom

An API key with read only permission is required to fetch the checks. The key can be provided in the PINGDOM_API_KEY environment variable.

alert-exporter -o pingdom.html --pingdom --pingdom-tags example-tag

Multiple sources at once

alert-exporter -o combined.html --prometheus --cloudwatch --aws-region eu-west-1

Formats

Predefined formats are provided with this tool:

  • HTML
  • Markdown
  • YAML

You can use a custom format by providing a Jinja2 file with the --jinja-template flag.

HTML output example

HTML output

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

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

alert_exporter-0.4.0.tar.gz (146.2 kB view details)

Uploaded Source

Built Distribution

alert_exporter-0.4.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file alert_exporter-0.4.0.tar.gz.

File metadata

  • Download URL: alert_exporter-0.4.0.tar.gz
  • Upload date:
  • Size: 146.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for alert_exporter-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d8f5e96265589c76a9f933bbae261703396378e029cf9662d9ab307bae7c038e
MD5 9966d962e3d759b4dc56009c3f96166f
BLAKE2b-256 1e3a3bf2e739b766f7e94292a878ef53fa43c94c1d1aba89aa245842b665f1c6

See more details on using hashes here.

File details

Details for the file alert_exporter-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for alert_exporter-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e16223993848e82dbaa33ffc12e07323a3d341654395720702b7f674718d21b
MD5 7511e0aea978c95e0d1824a626ba55b8
BLAKE2b-256 5ccc0dc71e1133be3a9894bacc273173e608072932d4055c49b4098589de2c4f

See more details on using hashes here.

Supported by

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