Skip to main content

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

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, etc.)

optional arguments:
  -h, --help            show this help message and exit
  --log-level {DEBUG,INFO,WARNING,ERROR}
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
  --jinja-template [JINJA_TEMPLATE]
  -f {markdown,csv,html,yaml}, --format {markdown,csv,html,yaml}
  --prometheus
  --context [CONTEXT]
  --cloudwatch
  --aws-profile AWS_PROFILE
  --aws-region AWS_REGION
                        Specific region to target. Default: Iterate over all regions available.

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

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

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
  • CSV
  • 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.2.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distributions

alert_exporter-0.2.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

alert_exporter-0.2.0-1-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

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