LandfallDocs
Integrations · Context sources

Connecting Grafana to Landfall

Connect your own Grafana so Beacon and every agent in the war room can query through it during an incident. That reaches every datasource your Grafana already has, including ones Landfall has no adapter for, such as Tempo.

  • As a source: Beacon and joined agents list your Grafana datasources and run queries through them. It takes a base URL and a Grafana service account token with the Viewer role.
  • As a trigger: a Grafana alert rule opens a war room, either through Alertmanager with a per-organization webhook secret or straight to Landfall with your organization's ingest token. See Opening a war room from a Grafana alert rule.
Grafana
Base URL, service account token
→
Landfall
Integrations · Context sources
→
War room
Beacon and joined agents query through it

How it works

Beacon reads your Grafana's datasource list first, then sends a query through Grafana's own query API to the datasource that fits the incident. If you already connected Prometheus and Loki directly, querying them through Grafana adds no new reach. The value is in whatever else Grafana has configured that Landfall has no adapter of its own for. Grafana answers in its own Data Frame JSON, whatever the datasource behind it.

What you'll need

  • A Grafana instance Landfall can reach. A Grafana inside your own private network is usually not reachable from a hosted Landfall the way a public SaaS API is.
  • A Grafana admin who can create a service account with the Viewer role. Grafana itself enforces read-only at that role, whatever Landfall calls. A broader role works too, but Landfall never calls a write endpoint.
  • An admin on your Landfall organization. Only admins can list, test and save connections.

1. Create a service account token in Grafana

  1. Administration → Users and access → Service accounts

    Click Add service account, give it a name you will recognize later, such as landfall-signals, and set its role to Viewer.

  2. Add service account token

    On the new service account's page, click Add service account token. Grafana shows the token once. Copy it before you close the dialog; a lost token means creating a new one.

    Grafana · Administration · Service accounts · landfall-signals
    Grafana's Service account token created dialog over the landfall-signals service account page, with the token value covered by a black box next to the Copy clipboard button.
    Behind the dialog, the service account has the Viewer role. The token value is covered by a solid black box, and the second token's name and the user in the permissions list are blurred.

2. Add it to Landfall

  1. Integrations → Context sources → Grafana

    Choose Integrations in the left menu, then the Grafana tile under Context sources. Enter your Grafana's base URL and the token you just created. Both fields are required.

    app.landfalls.ai · Integrations · Grafana
    Landfall's Grafana panel, Not configured, with Base URL https://grafana.example.com and a service account token shown as dots.
    The token in this picture is masked.
  2. Test connection

    Landfall calls your Grafana's /api/datasources with the token and saves nothing. It does not use /api/health, which answers 200 even for a missing or bad token. A good answer prints Grafana reachable at https://grafana.example.com, with your own base URL.

    app.landfalls.ai · Integrations · Grafana
    Landfall's Integrations page with the Grafana panel filled in and tested, showing a green connected mark and the line Grafana reachable at http://grafana:3000, while the Grafana tile still reads Not configured.
    Tested, not yet saved, so the Grafana tile still reads Not configured. The address http://grafana:3000 comes from a test setup where Grafana runs on the same private network as Landfall; yours is your own Grafana's base URL. The token is masked.
  3. Save integration

    Save checks Grafana again before it stores anything. A Grafana that cannot be reached, or that rejects the token, is refused and nothing is stored. Once saved, the Grafana tile reads Configured.

    app.landfalls.ai · Integrations · Grafana
    Landfall's Integrations page after saving Grafana, with the Grafana tile and panel reading Configured and the panel showing connected and saved.
    The tile and the panel read Configured, with a saved mark under the buttons. The base URL is from the same test setup as the picture above.

What it looks like

The signal catalog tells Beacon to call listDatasources first, then queryDatasource against the datasource that fits. Landfall has no shape adapter for Grafana's Data Frame answers yet, so a widget fed from Grafana is built from that raw answer.

What Beacon can read

OperationWhat comes back
listDatasourcesEvery datasource your Grafana has, with its name, type and uid, from /api/datasources. The catalog tells agents to call this first.
queryDatasourceA query Grafana runs against one datasource uid, through /api/ds/query. The answer is Grafana's Data Frame JSON, not the datasource's own format. With no range given it reads now-1h to now.

These operations reach Beacon and every agent that joins the war room through get_signal_catalog and query_signals. See Integrations architecture.

Opening incidents from Grafana

A Grafana alert rule can open a war room by itself. Grafana either pushes the alert into the Alertmanager you already pointed at Landfall, or posts it to Landfall's own Grafana webhook. Both are on Opening a war room from a Grafana alert rule. Querying through Grafana and opening incidents from it are independent, so you can set up either one alone.

Troubleshooting

Test connection failed?
  • A line starting Grafana: credentials rejected (401/403) means Grafana refused the token, for example because it was revoked, expired or mistyped. Grafana HTTP followed by a status code means Grafana answered with that error.
  • Check the base URL is reachable from where Landfall runs, not only from your own laptop. The two are often on different networks.
  • Enter the origin only, such as https://grafana.example.com. Landfall adds /api/ itself.
  • A plain http:// URL is refused. A deployment can allow it for listed organizations and address ranges (INTEGRATIONS_PRIVATE_HTTP_ORG_IDS and INTEGRATIONS_PRIVATE_HTTP_CIDRS, both empty by default). Only then does the panel show the checkbox Allow plain http to a private address (this network only). With it on, the address must resolve to 10.x, 172.16.x to 172.31.x, 192.168.x or an IPv6 unique-local address. Loopback, cloud metadata, shared (100.64.x) and public addresses always need https.
Connected, but Beacon finds nothing?
  • queryDatasource needs a datasource uid and type from listDatasources. A datasource missing from that list cannot be queried.
  • If people attached specific sources to the war room, get_signal_catalog lists only those. Attach Grafana to the room, or ask someone in it to.
  • A read that fails, for example after the token was deleted, reaches the agent marked as partial, so Beacon can tell a broken source from a quiet one.
No Grafana tile?

A source someone uninstalled on the Marketplace tab has no tile on the Integrations tab until it is installed again.

Reference

FieldValue
WhereIntegrations → Context sources → Grafana, admins only
Base URLRequired. Your Grafana's origin, reachable from Landfall.
Service account tokenRequired. A Grafana service account token, Viewer role recommended. Sent as Authorization: Bearer.
Allow plain http to a private address (this network only)Shown only where the deployment allows it for your organization. Off by default.
Scopes / capabilitiestelemetry
AccessRead-only. Landfall sends GET /api/datasources and POST /api/ds/query, which runs a query and changes nothing. At the Viewer role Grafana refuses writes itself.
SecretsThe token is kept in Landfall's secret store, apart from the rest of the config, and never shown again.
RevokeDelete the token from the service account's Tokens list in Grafana and reads fail from then on. The panel has no remove control; an admin removes the connection with DELETE /o/<your-org>/integrations/grafana/connections/<connection id>. GET on the same /connections path lists the ids.
Trigger endpointPOST https://api.landfalls.ai/triggers/alertmanager through Alertmanager, or POST https://api.landfalls.ai/triggers/grafana straight from a Grafana webhook. See Opening incidents from Grafana.