A simple web interface for sending alerts to Alertmanager using the standard amtool
command, built with FastAPI.
- Simple web UI for creating alerts
- Form field history with autocomplete suggestions
- Support for custom labels
- Integration with Alertmanager via amtool
- Modern, responsive design
- FastAPI with async support
- Automatic API documentation
- Python 3.7+
- FastAPI
- Uvicorn
- amtool (Alertmanager command-line tool)
- Install Python dependencies:
pip install -r requirements.txt
- Install amtool (Alertmanager tools):
# On Ubuntu/Debian
sudo apt-get install prometheus-alertmanager
# On CentOS/RHEL
sudo yum install prometheus2-alertmanager
# Or download from https://github.com/prometheus/alertmanager/releases
The application can be configured using environment variables:
ADAM_PORT
: Port to run the web server on (default: 5067)ALERTMANAGER_URL
: Alertmanager URL (default: http://localhost:9093)
- Start the application:
python app.py
-
Open your browser and navigate to
http://localhost:5067
-
Fill in the alert details:
- Summary: Brief description of the alert
- Description: Detailed description of the alert
- Severity: Choose from info, warning, or critical
- Service: Name of the service affected
- Custom Labels: Optional key-value pairs for additional context
-
Click "Send Alert" to send the alert to Alertmanager
FastAPI automatically generates interactive API documentation. After starting the server, visit:
http://localhost:5067/docs
- Swagger UI documentationhttp://localhost:5067/redoc
- ReDoc documentation
The application remembers previously entered values for:
- Summary
- Description
- Service
These values appear as suggestions when you focus on the input fields, making it easier to reuse common values.
You can add custom labels to provide additional context for your alerts. Each label consists of a key-value pair that will be attached to the alert in Alertmanager.
The application uses:
- FastAPI: Modern, fast web framework
- Uvicorn: ASGI server for running FastAPI
- Jinja2: Template engine for HTML rendering
- python-multipart: For handling form data