Skip to main content

Overview

OpenSRE queries Grafana (Cloud or self-hosted) for logs, metrics, traces, alert rules, and annotations during investigations. For a local Minikube lab with Prometheus and a sample app, see Extras.

Prerequisites

  • Grafana instance URL (Cloud stack URL or self-hosted origin)
  • Service account token with read access — see Credentials

Setup

Option 1: Interactive CLI

Provide the instance URL and service account token when prompted.

Option 2: Environment variables

For prod/staging pairs, use GRAFANA_INSTANCES — see Multi-instance integrations.

Option 3: Persistent store

Option 4: Hosted web app (OpenSRE Cloud)

Hosted OpenSRE Cloud is coming soon. Until then, use the local CLI, environment variables, or persistent store above.
When available, organization-wide Grafana connectors will be configured in the hosted web app:
  1. In app.tracer.cloud, go to IntegrationsGrafana
  2. Enter a name, instance URL, and service account token
  3. Click Save
Connect Grafana

Self-signed or internal CA certificates

If Grafana uses a certificate signed by an internal CA, opensre onboard prompts for: You can also set these in .env:

Credentials

Create a Grafana service account token with read access. See Grafana service account tokens.
  1. In Grafana, open AdministrationService accounts (or your stack’s equivalent).
  2. Create a service account with read access to the datasources you want OpenSRE to query.
  3. Add a token to that service account and copy it (shown once).
Use this value as GRAFANA_READ_TOKEN (CLI prompt: service account token).

Investigation tools

Deployment and config-change markers are covered on Grafana Annotations. To push investigation reports into Loki/annotations, see Grafana Log Sink. For standalone Tempo (no Grafana proxy), see Grafana Tempo.

Verify

Troubleshooting

Security

  • Prefer a dedicated service account token with read-only access for investigations.
  • Prefer GRAFANA_CA_BUNDLE over disabling TLS verification for real internal Grafana.
  • Set GRAFANA_VERIFY_SSL=false only for local/lab instances.
  • Store tokens in .env or your secret manager — not in source control.

Extras

Local Grafana setup (Minikube example)

Use this lab to run Grafana, Prometheus, and a sample app locally, then connect OpenSRE.

Steps

  1. Start Minikube:
  2. Add Helm repositories and update:
  3. Install the kube-prometheus stack:
  4. Install the podinfo sample app:
  5. (Optional) Check pods:
  6. Port-forward podinfo (separate terminal):
  7. Port-forward Prometheus (separate terminal):
  8. Port-forward Grafana on all interfaces (separate terminal):
  9. Allow Prometheus to scrape podinfo ServiceMonitors:

Grafana credentials

Get the admin password:
Username is admin; password is the command output.

Access

Simulate load

Sample Grafana queries

Request rate by status:
p95 latency:
Spike in Error Rate in Grafana

Prometheus alert for high error rate

The alert fires after about 30 seconds of elevated errors. Check http://localhost:9090/alerts.
Prometheus Alert Firing

Connect OpenSRE to the lab Grafana

  1. Get your machine’s LAN IP:
  2. Create a Grafana service account token (Grafana docs).
  3. Run setup and enter:
    For local/lab TLS issues, set GRAFANA_VERIFY_SSL=false or answer the SSL prompts as described in Setup.
    Successful Grafana Integration with OpenSRE