Use the package manager pip to install alert-exporter.
pip install alert-exporter
❯ 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
--prometheus-filter [JSON]
--context [CONTEXT]
--cloudwatch
--aws-profile AWS_PROFILE
--aws-region AWS_REGION
Specific region to target. Default: Iterate over all regions available.
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"}'
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
alert-exporter -o combined.html --prometheus --cloudwatch --aws-region eu-west-1
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.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.