Interview Prep/Monitoring & Observability/Grafana dashboards and data sources

Loki data source returns `Data source connected, but no labels received`

IntermediateTroubleshootingGrafana dashboards and data sources
Answer

Likely causes → No logs have been ingested in the queried range, the X-Scope-OrgID tenant header is wrong/missing in multi-tenant Loki, or the URL points at the wrong component.

Diagnose →

curl -s -H 'X-Scope-OrgID: prod' http://loki-gateway/loki/api/v1/labels

Fix → Add the X-Scope-OrgID custom header in the data source, point to the gateway/query-frontend, and confirm agents are shipping.

Prevent → Provision tenants explicitly per data source.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana dashboards and data sources