Prometheus & Grafana Setup for Baselinr
This directory contains the configuration for Prometheus and Grafana to monitor Baselinr metrics.
Quick Start
-
Start Baselinr with metrics enabled (on your host machine):
baselinr profile --config examples/config.ymlMake sure
monitoring.enable_metrics: trueandmonitoring.keep_alive: truein your config. -
Start the monitoring stack:
cd docker
docker compose up -d prometheus grafana -
Access the services:
- Grafana: http://localhost:3001 (username:
admin, password:admin) - Prometheus: http://localhost:9090
- Baselinr Metrics: http://localhost:9753/metrics
- Grafana: http://localhost:3001 (username:
Importing the Dashboard
- Open Grafana at http://localhost:3001
- Login with
admin/admin - Go to Dashboards → Import
- Click Upload JSON file
- Select
docker/grafana-dashboards/baselinr-dashboard.json - Click Import
The dashboard will automatically show metrics once Prometheus starts scraping.
Verifying Prometheus is Scraping
- Open Prometheus at http://localhost:9090
- Go to Status → Targets
- You should see
baselinrtarget with status UP
If the target shows as DOWN, check:
- Is Baselinr running with metrics enabled?
- Can you access http://localhost:9753/metrics from your browser?
- On Linux, you may need to change
host.docker.internalto your host IP inprometheus.yml
Troubleshooting
Prometheus can't reach Baselinr
On Windows/Mac: host.docker.internal should work automatically.
On Linux: You may need to:
- Find your host IP:
ip addr show docker0orhostname -I - Update
prometheus.ymlto use that IP instead ofhost.docker.internal - Or add
network_mode: hostto the prometheus service (Linux only)
No metrics showing in Grafana
- Check Prometheus targets: http://localhost:9090/targets
- Check if metrics exist: http://localhost:9090/graph?g0.expr=baselinr_profile_runs_total
- Verify Baselinr is running and metrics endpoint is accessible
- Check Grafana datasource is connected: Configuration → Data Sources → Prometheus
Port conflicts
- Grafana uses port 3001 (to avoid conflict with Dagster on 3000)
- Prometheus uses port 9090
- Baselinr metrics uses port 9753
Change ports in docker-compose.yml if needed.
Files
prometheus.yml- Prometheus configuration (scrape targets, intervals)grafana-datasources.yml- Auto-configures Prometheus as Grafana datasourcegrafana-dashboards/baselinr-dashboard.json- Pre-built Baselinr dashboard
Stopping the Stack
docker compose down
To also remove volumes (clears Prometheus and Grafana data):
docker compose down -v