System
Metrics
Scrape Prometheus-compatible metrics from the Blnk server and worker processes.
GET
Returns OpenTelemetry metrics in Prometheus text format. Requires
See Health check for the same server/worker split on
When authentication fails, responses use structured JSON errors. See API error codes for
enable_observability to be true on each process you scrape. See Metrics reference for metric names, types, and attributes.
Blnk runs the server and worker as separate processes. Each registers its own GET /metrics endpoint on a different port. The path is the same, but the series differ — scrape both targets in Prometheus to capture API and async processing signals.
| Endpoint | Process | Port setting | Default URL |
|---|---|---|---|
GET /metrics | Server | server.port | http://localhost:5001/metrics |
GET /metrics | Worker | queue.monitoring_port | http://localhost:5004/metrics |
GET /health.
Authentication
/metrics uses Authorization: Bearer <token>, not X-Blnk-Key. When metrics_bearer_token is set, or secure mode is on without a token configured, bearer authentication applies. See Metrics endpoint.
Bearer token when required. Format:
Bearer <metrics-bearer-token>.AUTH_METRICS_TOKEN_REQUIRED, AUTH_INVALID_BEARER_TOKEN, and AUTH_METRICS_DISABLED.
401 Unauthorized