forked from kieraneglin/pinchflat
-
Notifications
You must be signed in to change notification settings - Fork 0
Prometheus and Grafana
o51r15 edited this page Jun 18, 2026
·
1 revision
Pinchfork includes a Prometheus metrics endpoint for collecting application performance metrics. These are generic performance metrics (request latency, queue depth, DB connection pool, etc.) rather than application-specific metrics like media library size.
- Prometheus installed and running
- Grafana installed and running with Prometheus added as a data source
Set ENABLE_PROMETHEUS to any non-empty value:
environment:
- ENABLE_PROMETHEUS=trueThen add Pinchfork to your Prometheus scrape config:
scrape_configs:
- job_name: pinchfork
static_configs:
- targets: ['your.server.ip:8945']Pre-made Grafana dashboards are included in the repo at priv/grafana/. Available dashboards:
application.json-
beam.json— the Erlang VM -
phoenix.json— the web framework -
ecto.json— the database connector -
oban.json— the job runner -
phoenix_live_view.json— websocket rendering
To import a dashboard into Grafana:
- Go to Connections → Data Sources → your Prometheus source and note the Name field.
- Select a dashboard JSON from the repo.
- If your data source name is anything other than
prometheus, find and replace"datasource": "prometheus"with"datasource": "<your name>"in the JSON. - In Grafana, go to Dashboards → New → Import, paste the JSON, and click Load.