A Grafana data source plugin to query OpenObserve logs and traces (log search, trace search, and service map).
Fork notice. This is a fork of the original openobserve/openobserve-grafana-plugin. It builds on that project with a redesigned query editor (log/trace/service-map tabs), SQL autocomplete, field "top values", a single-request histogram, and other fixes. All credit for the original plugin goes to the OpenObserve team; see the upstream repository for the canonical source.
🤖 AI agent notice. This fork was developed largely through AI-assisted "vibe coding" (an AI coding agent). While it is tested (typecheck, unit tests, and builds pass), please review the code yourself and validate behavior in your own environment before relying on it in production.
This plugin is a thin proxy to OpenObserve: it forwards search/values/streams API requests to the OpenObserve instance you configure, authenticated with the credentials stored on the Grafana data source. OpenObserve performs the authorization — the plugin does not add any access control of its own.
As a result:
- Anyone who can use this data source in Grafana can issue API requests to OpenObserve with the configured credentials, across any organization/stream those credentials can reach.
- The query editor lets users run arbitrary SQL (and
_values/streamslookups), so access is effectively "whatever the configured OpenObserve credentials are allowed to do" — which may be broader than what an individual Grafana user should have, and can exceed this plugin's intended read-only logs/traces use case.
Recommendations:
- Use this plugin in trusted / internal environments only, and restrict who can access the Grafana instance and this data source (Grafana data source permissions / RBAC).
- Scope the credentials on the OpenObserve side: configure a least-privilege user/service account or API key limited to the specific organization(s) and stream(s) that should be queryable, with read-only access. Do not use admin/root credentials.
- Avoid exposing a Grafana instance that uses this data source to untrusted users.
This plugin is unsigned, so installing it always means two things:
- Install the plugin (id:
openobserve). - Allow the unsigned plugin (
allow_loading_unsigned_plugins = openobserve).
Then restart Grafana and add the data source. The fastest path is the recommended Docker Compose snippet below — it does both in one step.
Replace
v1.0.1/1.0.1in the URLs below with the latest version from the Releases page.
🟢 Docker Compose — recommended. Grafana downloads, installs, and allows the plugin on boot:
services:
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_INSTALL_PLUGINS: "https://github.com/Windforce17/openobserve-grafana-plugin/releases/download/v1.0.1/openobserve-1.0.1.zip;openobserve"
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: "openobserve"Environment variables (existing Grafana). Set these on the Grafana process, then restart:
GF_INSTALL_PLUGINS=https://github.com/Windforce17/openobserve-grafana-plugin/releases/download/v1.0.1/openobserve-1.0.1.zip;openobserve
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=openobservegrafana.ini preinstall (Grafana 11.5+). Syntax is id@version@url:
[plugins]
preinstall = openobserve@1.0.1@https://github.com/Windforce17/openobserve-grafana-plugin/releases/download/v1.0.1/openobserve-1.0.1.zip
allow_loading_unsigned_plugins = openobserveManual (air-gapped or locally built). Download openobserve-<version>.zip from the
Releases page and extract it
into Grafana's plugin directory:
# default plugin dir is /var/lib/grafana/plugins
unzip openobserve-1.0.1.zip -d /var/lib/grafana/plugins
# result: /var/lib/grafana/plugins/openobserve/plugin.jsonIn Docker, mount the extracted folder instead:
volumes:
- ./openobserve:/var/lib/grafana/plugins/openobserveEither way you must also allow the unsigned plugin — via grafana.ini
(allow_loading_unsigned_plugins = openobserve) or env var
(GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=openobserve).
Build from source. See Getting started; copy dist/ to
<grafana-plugins-dir>/openobserve, allow the unsigned plugin, and restart Grafana.
- Restart Grafana, then confirm the plugin loaded under Administration → Plugins (search "OpenObserve").
- Go to Connections → Data sources → Add new data source → OpenObserve.
- Set the OpenObserve URL and authentication (see the Security notice about scoping credentials).
- Click Save & test.
Plugin not showing up? Check the Grafana server logs for an unsigned-plugin warning, and make sure the plugin folder is named exactly
openobserve.
OpenObserve streams can carry very wide dynamic schemas (hundreds to thousands of fields, e.g. with a large UDS). The plugin is built to stay fast in that case:
- Log frame columns come from the returned rows, not from the stream schema. Only fields that actually appear in the result become columns (capped at 500, with a panel warning when rows carry more). This keeps Explore responsive even on streams with thousands of schema fields.
- Schemas are fetched lazily. The query editor downloads only the selected stream's schema (for autocomplete and field pickers), never every stream's schema at once.
- Log message field (data source setting): when set (e.g.
message,log,body), that field is rendered as the log line; rows missing it fall back to the whole row as JSON. Strongly recommended for wide streams — multi-KB JSON log lines render slowly.
If log lines sometimes render on top of each other in Explore, that is a known Grafana core bug in the virtualized log list's row-height estimation for long wrapped lines (see grafana/grafana#103538 and this community report) — not something the data source controls directly. What helps:
- Set the Log message field in the data source settings so log lines are short message strings instead of huge JSON blobs (long wrapped lines are the trigger).
- Toggle Wrap lines off in the logs panel controls (unwrapped rows have uniform height).
- Keep Grafana updated — height-estimation fixes have landed in successive 12.x patch releases.
Grafana supports a wide range of data sources, including Prometheus, MySQL, and even Datadog. There’s a good chance you can already visualize metrics from the systems you have set up. In some cases, though, you already have an in-house metrics solution that you’d like to add to your Grafana dashboards. Grafana Data Source Plugins enables integrating such solutions with Grafana.
This project uses pnpm (see the packageManager field in package.json).
Enable it with corepack enable if you don't have it installed.
-
Install dependencies
pnpm install
-
Build plugin in development mode and run in watch mode
pnpm dev
-
Build plugin in production mode
pnpm build
-
Run the tests (using Jest)
# Runs the tests and watches for changes, requires git init first pnpm test # Exits after running all the tests pnpm test:ci
-
Spin up a Grafana instance and run the plugin inside it (using Docker)
pnpm server # or use the helper script (builds the plugin, then starts Grafana on http://localhost:3000) pnpm dev:grafana -
Run the E2E tests (using Cypress)
# Spins up a Grafana instance first that we tests against pnpm server # Starts the tests pnpm e2e
-
Run the linter
pnpm lint # or pnpm lint:fix -
Type-check the project
pnpm typecheck
Below you can find source code for existing app plugins and other related documentation.
- Upstream project: openobserve/openobserve-grafana-plugin — the original source this fork is based on
- OpenObserve SQL functions reference
- Basic data source plugin example
- Plugin.json documentation
This plugin is a fork of openobserve/openobserve-grafana-plugin, created and maintained by the OpenObserve team. Many thanks to the original authors. This fork is not officially affiliated with or endorsed by OpenObserve.