Prometheus Remote Write
Flowhawk receives Prometheus Remote Write 2.0 at its ingest address. Metrics arrive next to the traces and logs of the same service, so a flow's page can show the queue depth or pool usage of the service it runs on.
What you get
- Every metric in Metrics, charted by any label, on dashboards and in alerts.
- Metrics joined to a service by the job name, and through it to the flows that service serves.
- Grafana dashboards you already have can be imported from their JSON (Dashboards).
Set it up
First create an ingest key: in the app, open Settings > API keys and pick Services. In the examples below, KEY stands for that key. Keep it out of your repository, like any other secret.
# prometheus.yml
remote_write:
- url: https://ingest.flowhawk.dev/api/v1/write
protobuf_message: io.prometheus.write.v2.Request
authorization:
credentials: KEY
Prometheus needs version 3.8 or later and --enable-feature=metadata-wal-records. Remote Write 1.0 isn't accepted.
The job name becomes the service name, so name each scrape job after the service it scrapes.
Hosts, containers and Kubernetes
For machine metrics, run an OpenTelemetry Collector with the hostmetrics, docker_stats, kubeletstats or k8s_cluster receivers and an otlphttp exporter to https://ingest.flowhawk.dev with the same header. A container or pod reaches a service when it is named after the service.
exporters:
otlphttp/flowhawk:
endpoint: https://ingest.flowhawk.dev
headers:
Authorization: Bearer ${env:FLOWHAWK_API_KEY}