Grafana Integration
Connect Grafana to xScaler as a Prometheus data source to visualise your metrics using PromQL.
Works with Grafana 9+ — both self-hosted and Grafana Cloud.
Step 1 — Add a Prometheus data source
- In Grafana, navigate to Connections → Data Sources.
- Click Add new data source.
- Select Prometheus.
Step 2 — Set the server URL
In the Prometheus server URL field, enter:
https://euw1-01.m.xscalerlabs.com/prometheus
:::warning Include the /prometheus path
The /prometheus path prefix is required. Without it, Grafana will receive a 404 or empty results.
:::
Step 3 — Add authentication headers
Scroll down to the HTTP Headers section and add two custom headers:
| Header Name | Header Value |
|---|---|
Authorization | Bearer <token> |
X-Scope-OrgID | <tenant-id> |
:::danger Do not use Basic Auth or the Authentication section
xScaler uses token-based authentication via the Authorization: Bearer header. Do not fill in the Basic Auth username/password fields or the Grafana Authentication section — use custom HTTP headers only as shown above.
:::
Step 4 — Save & Test
Click Save & Test. A successful connection displays:
Data source is working
If you see an error, verify:
- The URL ends in
/prometheus Authorizationvalue is exactlyBearer <token>(capital B, space before token)X-Scope-OrgIDvalue matches your tenant ID from the dashboard
Starter PromQL queries
Copy these into a new Grafana panel to build your first service dashboard.
Request rate by route
sum(rate(http_requests_total[5m])) by (route)
p99 latency by route
histogram_quantile(0.99,
sum(rate(http_request_duration_seconds_bucket[5m])) by (le, route)
)
5xx error rate
sum(rate(http_requests_total{status=~"5.."}[5m]))
/ sum(rate(http_requests_total[5m]))
Queue depth
job_queue_depth
Troubleshooting
"Bad Gateway" on Save & Test
- Verify the URL is
https://euw1-01.m.xscalerlabs.com/prometheus(HTTPS, with/prometheuspath). - Check that both
AuthorizationandX-Scope-OrgIDheaders are in the HTTP Headers section, not the Authentication section.
Empty results after connecting
- Use Explore with query
upto confirm the connection works. - Check the time range selector — make sure it covers when your metrics were sent.
"Forbidden" error
- Your token may be
write-scoped. Generate areadorread+writetoken from the xScaler dashboard.