Skip to main content
Grafana Cloud’s hosted Prometheus is a valid source for Observer agents. The connection uses basic auth with credentials issued by Grafana for read access.

Steps

  1. In Grafana Cloud, open the stack details for the Prometheus instance you want the agent to read. Note:
    • URL: the Prometheus query endpoint (ending in /api/prom) (e.g. https://prometheus-prod-01-eu-west-0.grafana.net/api/prom).
    • Username: the numeric user id (e.g. 123456).
    • Password: a Grafana Cloud access policy token with metrics:read scope.
  2. Set the agent’s environment:
    .env
  3. Restart the agent. Prometheus probe queries now go to Grafana Cloud.

Verification

Define a Prometheus metric in the console (any working PromQL query against the data Grafana Cloud holds). Within one push interval the metric reports a value. Failures resolve to no_data with a reason:
  • Unauthorized when the access policy token is missing or lacking the required scope.
  • BadQuery when the PromQL string is invalid against the data.
  • PromUpstream for Grafana-side 5xx responses.
Several Prometheus servers on one agentWhen one agent reads from multiple Prometheus servers (Grafana Cloud + a local Prometheus, for example), the PROMETHEUS_SERVER_URL env var sets the default and individual metrics override it via the prometheus_url field on the metric definition.