Prometheus is an open-source systems monitoring and alerting toolkit that collects and stores its metrics as time series data. This sample app shows how to ingest data from Prometheus alerts via webhooks into Deephaven.
This repository was built for Deephaven Community Core v0.11.0. No guarantee of forwards or badckwards compatibility is made.
This app runs a Python Flask server that accepts Prometheus alert webhooks. The webhooks are deserialized, and the desired values are extracted and stored into a Deephaven table.
docker-compose.yml
launches:
- A Deephaven instance
- A Prometheus instance
- A Prometheus alert manager
- A Flask web server that listens for Prometheus alerts and populates a Deephaven table upon new events
promDhAlertsStart.sh
- Helper script that launches the application.docker-compose.yml
- Docker compose file that defines the Deephaven, Prometheus, and Python docker images.
prometheus/prometheus.yml
- The Prometheus config file. This has been thinned down to handle just the alerts.prometheus/rules.yml
- The Prometheus alert rules file. This includes the configuration for what triggers alerts.
alertmanager/config.yml
- The Prometheus alerts rules. This includes the configuration for the webhook alerts destination URL.
flask-app/requirements.txt
- Python dependencies for the application.flask-app/server.py
- The Python server that accepts the Prometheus alert webhooks.flask-app/Dockerfile
- The Dockerfile for the Python server.
- The Deephaven-core dependencies are required for this project.
Before launching, you can modify any of the files in the prometheus/
or alertmanager/
directories to configure what alerts are sent, and where the alerts are sent. The default values can be used to demonstrate functionality.
Once you are set, simply run the following to launch the app:
sh promDhAlertsStart.sh
Your Flask server should be running, and you can go to http://localhost:10000/ide to view the table in the top right Panels tab! This table will update as alerts are fired and resolved.