Skip to main content
Self-hosted Onyx exposes Prometheus metrics for the API server, the MCP server, and the background workers. Use them to build dashboards and alerts for request latency, database connections, background tasks, connector health, search, and license seats.

Metrics endpoints

Each background worker serves its metrics on its own port:
The worker metrics ports have no authentication. Do not expose them outside your cluster network.

Set up scraping

1

Set the metrics token

Set auth.metricsAuth.enabled: true and set auth.metricsAuth.values.metrics_auth_token. Generate a value with openssl rand -hex 32. Helm install and upgrade fail if the token is empty. To use a secret that you manage, set auth.metricsAuth.existingSecret instead. See Security Hardening.
2

Create the ServiceMonitors

Set monitoring.serviceMonitors.enabled: true. This needs the Prometheus Operator CRDs. Use monitoring.serviceMonitors.labels to match the serviceMonitorSelector of your Prometheus resource. If Prometheus runs in a different namespace, its serviceMonitorNamespaceSelector must also select the Onyx namespace. The API and MCP ServiceMonitors send the metrics token automatically.
3

Add the dashboards (optional)

Set monitoring.grafana.dashboards.enabled: true to deploy Grafana dashboard ConfigMaps. The Grafana sidecar must watch the Onyx namespace for the label grafana_dashboard=1.
If METRICS_AUTH_TOKEN is not set, the API and MCP /metrics endpoints return 401 for every request. Set DISABLE_METRICS_AUTH=true only on a network that users cannot reach.

Configuration

Metric families

All Onyx-specific metrics start with onyx_. Each scrape returns a help string for every metric.

Example alerts