To add to what @florent said, here's the complete picture:
Why your command failed:
-
Wrong URL:
localhost:9004is the internal port that only listens on
127.0.0.1. It's proxied through xo-server at/openmetrics/metrics. -
Wrong token: The error "Query authentication does not match server setting"
means your Bearer token doesn't match the one configured in the plugin.
Correct approach:
-
Get your secret from: Settings → Plugins → OpenMetrics → "Prometheus secret"
-
Use the proxied endpoint:
curl -H "Authorization: Bearer <your-actual-secret>" \ http://<your-xo-server>/openmetrics/metrics -
For health checks (no auth required):
curl http://<your-xo-server>/openmetrics/health
Returns: {"status":"ok"}
Full documentation is available at:
https://docs.xen-orchestra.com/advanced#openmetrics--prometheus-integration
It covers Prometheus configuration, available metrics, Grafana dashboards,
alerting rules, and troubleshooting.
@MajorP93 Thanks for sharing your Grafana dashboard! It could indeed be a nice
addition to link it from the official docs as a community example.