Connect Prometheus, Tempo or Loki directly

Instead of going through Grafana, a connection can query a Prometheus-compatible store (Prometheus, Mimir, Thanos, VictoriaMetrics, Grafana Cloud Metrics), a Loki or a Tempo by its own HTTP API. Each connection is one backend and answers one signal: Prometheus for metrics, Loki for logs, Tempo for traces.

Public URLs only

When Guidely calls a backend directly, the URL must be reachable from the internet:

  • https:// (or http://) with a public host name or address, on any port (:9090 is fine).
  • Private, loopback, link-local and other internal addresses are refused, both when you save the URL and on every request (the name is resolved again and checked each time, so DNS can't be pointed somewhere private later). So are names like *.internal, *.local and *.corp.
  • Redirects aren't followed.
  • The URL may include a path, for a backend served under a prefix: https://gateway.example.com/prometheus. Don't put credentials in it.

For anything on a private network, run a relay instead: the connection is set up the same way, but picks a relay target in place of a URL.

Add the connection

A workspace admin opens Integrations → Grafana, Prometheus, Tempo, Loki → Add connection, picks the kind (Prometheus, Loki or Tempo), Public URL, enters the URL and the authentication, then Test and Save. The test asks Prometheus for its build info (or runs vector(1) where that isn't served, as on Mimir and Grafana Cloud), Loki for its labels, and Tempo's echo endpoint.

Authentication

OptionSendsUse it for
NonenothingA backend that's protected another way (an IP allowlist on your side, for example).
Bearer tokenAuthorization: Bearer <token>Most gateways, OAuth2 proxies, Grafana Cloud with an access policy token.
Basic authAuthorization: Basic …Grafana Cloud (user = the stack's instance id, password = an access policy token), nginx or Traefik basic auth.
Custom header<Header>: <value>An API key header, or X-Scope-OrgID for a multi-tenant Mimir, Loki or Tempo.

Credentials are encrypted at rest and never shown again; only their last characters are. They are sent only to that connection's URL. To change them, enter new ones and save; leave them empty to keep the saved ones.

Tenants (X-Scope-OrgID). Mimir, Loki and Tempo in multi-tenant mode need the tenant in the X-Scope-OrgID header. Use Custom header with X-Scope-OrgID and your tenant id. If the backend also needs a token, put a gateway in front that adds one of the two, or use a relay, which can send both (TARGET_<NAME>_ORG_ID with TARGET_<NAME>_BEARER).

Grafana Cloud

Each Grafana Cloud stack has its own Prometheus, Loki and Tempo endpoints, listed on the stack's page at grafana.com (Details on each of Prometheus, Loki and Tempo):

KindURL (example)Basic auth user
Prometheushttps://prometheus-prod-13-prod-us-east-0.grafana.net/api/promthe Prometheus instance id (a number)
Lokihttps://logs-prod-006.grafana.netthe Loki instance id
Tempohttps://tempo-prod-04-prod-us-east-0.grafana.net/tempothe Tempo instance id

For the password, create an access policy (grafana.com → Security → Access Policies) with the metrics:read, logs:read and traces:read scopes, add a token to it, and use that token for all three. Keep the path in the URL (/api/prom, /tempo): Guidely appends the API paths to it.

Or connect the stack's Grafana once, with a service account, and pick its data sources.

A direct connection doesn't know about Grafana, so its panels have no Open in Grafana link unless you give one: set Grafana URL for links to your Grafana and Its data source UID to the UID of the matching data source there (in Grafana, the data source's settings page URL ends with it).