Metrics And Health
Midden exposes health endpoints and optional Prometheus/OpenMetrics metrics.
Health
GET /healthz
GET /readyz
/healthz returns ok when the HTTP server is alive.
/readyz checks database and storage health and returns:
database=true
storage=true
If either dependency is unavailable, it returns HTTP 503 with the failed dependency state.
Metrics
[metrics]
enabled = true
access = "admin"
Metrics are served at:
GET /metrics
The response content type is OpenMetrics text.
Access Modes
metrics.access accepts:
public: no authentication.admin: current web session must be an admin or owner.token: request must includeAuthorization: Bearer <metrics bearer token>.loopback: request client IP must be loopback.
Token mode requires:
[metrics]
access = "token"
bearer_token = "change-me"
Loopback mode can respect reverse proxy headers only when server.behind_proxy = true.
Metric Names
Registered metrics include:
uploadspastesupload_bytesserved_filesreportsscanner_outcomesrate_limit_rejectionsrequest_latency_seconds