Visualizing OpenSearch data in Grafana

Grafana can chart OpenSearch data through its OpenSearch data source plugin. This page covers when that choice fits, how to authenticate to a secured cluster, and how to combine OpenSearch and Prometheus panels.

On this page

How the Grafana OpenSearch data source connects dashboards to your cluster

Your team already runs OpenSearch and wants Grafana dashboards beside the metrics it may already chart in Prometheus or other systems. The supported route is Grafana's OpenSearch data source plugin, which OpenSearch documents in its Grafana support docs. The plugin reads from the cluster over its API, so the work is configuration, authentication and dashboard design inside infrastructure you control, whether that is your cloud accounts, data centers or an air-gapped network. Grafana offers many data sources, and the plugin is one of them. Choosing it means your dashboards depend on the OpenSearch API and on the access rules that protect it.

Because the plugin talks to the cluster directly, the answers depend on how the cluster's security settings are configured. The Security plugin's authentication backend and role mappings decide which Grafana service account can reach which indexes, and document-level or field-level security can hide data from some dashboard viewers. Confirm with your security team which identity backend the cluster uses, whether TLS is enforced on client traffic, and which indexes the Grafana account must query before you design panels. A dashboard that works for an administrator can fail or show partial data for a restricted account, so test with the role your viewers will hold.

Plan the connection before the first dashboard is built. Decide which OpenSearch version and Grafana version you will pin, check the plugin's compatibility notes for that pairing, and record which cluster endpoint, certificate authority and service account Grafana will use. Grafana can be configured as code with provisioning files, so the data source definition can be reviewed and rebuilt in the same way as the rest of the platform. Ask your implementation partner or your own engineers to document these choices in writing so that dashboard owners, auditors and the team that rotates credentials all work from the same record.

What you need before connecting Grafana to OpenSearch

Connecting Grafana to OpenSearch touches four parts of your stack: the OpenSearch cluster, the Grafana plugin, the Grafana database and the network and identity path between them. Confirm each one before you change any configuration, because a mismatch in any of them shows up later as failed queries or access errors that are hard to trace.

Supported OpenSearch version in maintenance

Confirm that your cluster runs a version that still receives bug fixes and security patches. During maintenance, OpenSearch versions get fixes but no new features, and a version past its maintenance window will not get patches. Check the current maintenance status on the releases page, then confirm which OpenSearch versions the Grafana plugin supports before you pick a Grafana release. Plan any cluster upgrade before you build dashboards on top of it.

OpenSearch releases

Grafana version with the OpenSearch plugin

Pick a Grafana release that includes the OpenSearch data source plugin and check that it matches your planned update cadence. Grafana publishes major releases yearly, minor releases every other month and patch releases at least monthly, and each minor release is supported for a limited period. Record the version you deploy so that upgrades to Grafana and to the plugin are tested together against your cluster.

Grafana upgrade guidance

Production database for Grafana

Grafana stores its configuration in SQLite by default, but SQLite does not scale for production. Plan MySQL 8.0 or later, or PostgreSQL 12 or later, for production use, and require one of them if you want two or more active Grafana servers behind a load balancer. Ask your team who owns that database, how it is backed up and where its credentials are stored.

Network paths from Grafana to the cluster

Grafana must reach the OpenSearch HTTP port from its own network segment, and the path must allow the TLS handshake and any proxy or load balancer in between. Map the firewall rules, DNS names and routes from every Grafana server to every cluster endpoint Grafana will query. If the cluster sits in a separate zone or data center, confirm that traffic can stay inside your approved network.

Certificates for encrypted connections

Decide which certificate authority signs the cluster certificates and whether Grafana must trust it through a custom CA bundle. Confirm how the certificate is renewed, who rotates it and whether Grafana needs a restart to pick up the new chain. A missing or expired certificate is a common cause of connection failures that appear only after go-live.

Service account and role for Grafana

Create a dedicated OpenSearch user for Grafana with read-only roles scoped to the indexes and fields its dashboards need. Use the OpenSearch Security plugin's role-based access control so that the account cannot write, delete or read indexes outside the dashboard scope. Confirm which authentication method the plugin supports for your security setup, such as basic credentials or a token, in the OpenSearch Grafana documentation before you assume it.

OpenSearch Grafana docs

When Grafana beats OpenSearch Dashboards for a given team

Platform and SRE teams usually care about one screen for many systems: cluster health, host metrics, queues, and application logs side by side. Grafana is built around panels that can each query a different data source, so an OpenSearch log count can sit next to a Kubernetes CPU graph on the same dashboard. Grafana also supports alerting and provisioning as code, which fits teams that already manage configuration in version control.

  • Multi-source panels: A single dashboard can combine OpenSearch queries with other data sources that Grafana supports, which keeps the operations view in one place.
  • Alerting in Grafana: Teams can define alert rules on panel queries, but the OpenSearch alerting features in Dashboards may cover the same need. Confirm which one your on-call process will use.
  • Provisioning as code: Data sources and dashboards can be defined in YAML or JSON files loaded at startup, so a cluster rebuild does not depend on manual clicks.
  • Dashboards still matter: Index-level tools, cluster management pages, and OpenSearch-specific features stay in Dashboards, so SREs will still use it for some tasks.
  • Access model: Grafana users and OpenSearch roles are separate systems, so plan how a Grafana viewer maps to the cluster permissions behind the data.

Before you standardize, build the three or four panels your on-call engineers use most in Grafana and check that each query returns the same result as in Dashboards.

How Grafana queries OpenSearch and Prometheus across trust boundaries

The diagram starts with a user's browser, which reaches a load balancer in front of two or more Grafana servers inside the client's network. Each Grafana server reads and writes its configuration in a shared MySQL or PostgreSQL database, which is the second trust boundary to review. When a panel runs, the Grafana server calls the OpenSearch cluster over HTTPS using the configured data source credentials, and query results return along the same path. A separate path leads to the Prometheus server. Check which credentials are stored in the Grafana database, who can read them, and whether the OpenSearch role limits what the Grafana user can see.

Credential-carrying and result-carrying paths from browser to data sources.

Connecting the Grafana OpenSearch data source step by step

This sequence takes a Grafana instance from no OpenSearch access to a provisioned, least-privilege data source with one bounded panel, so the setup can be rebuilt from files rather than recreated by hand.

  1. Create a read-only role for Grafana

    The OpenSearch administrator creates a role that grants read permissions only (search and view on index patterns), limited to the indices the dashboards actually need, such as logs-app-* for one application. Nothing in the role should allow writes, index management or cluster administration. The check is that the role is visible in the Security plugin with only the index patterns you listed, and that a test user mapped to it can read those indices and nothing else. Confirm the exact permission names against the OpenSearch security documentation for your version before you write the role.

  2. Create a dedicated service account

    Create a service user for Grafana, map it to the read-only role, and generate its credential through your identity or secrets process rather than a shared administrator password. Record who owns the account and where the credential is rotated. The check is a successful login to the cluster with that user from the Grafana host's network path, and a failed login with a wrong password, which confirms that authentication is enforced. Confirm which authentication backend your cluster uses for service accounts, since this varies with your Security plugin configuration.

  3. Store the credential in Grafana secret handling

    Put the password into Grafana's secret storage or an environment variable supplied by your secrets platform, and reference it from the data source configuration instead of typing it into the data source form or into a dashboard JSON export. Restrict who can edit data sources in Grafana, since data source editors can read or replace stored credentials in some configurations. The check is that the data source settings page shows the credential as set but does not display its value, and that a dashboard export contains no password.

  4. Add the OpenSearch data source

    In Grafana, add an OpenSearch data source using the cluster URL, the authentication method that matches your cluster (TLS settings included, with the CA certificate your internal authority issues), the time field used by your indices, and the index pattern from step one. Confirm the OpenSearch version selector matches the cluster version. The check is a successful data source test that returns a green status. If it fails with a certificate error, fix trust before changing permissions, and if it fails with an authorization error, compare the role's index patterns with the index names the cluster reports.

  5. Build one panel with a bounded time range

    Create a dashboard with a single panel that runs a simple count or date histogram over the time field, and set the dashboard time range to a fixed window such as the last few hours rather than all history. Keep the query narrow with a filter on a known field. The check is that the query returns documents and the count is plausible when compared with a search run directly in OpenSearch Dashboards for the same window. A mismatch usually points to the time field or timezone setting, which should be fixed before more panels are added.

  6. Confirm the restriction holds

    Run a query in Grafana against an index outside the role's pattern, or point a second data source at a broader index name, and confirm the query is rejected with a permission error. This proves the read-only role, not the dashboard design, is the control that limits what Grafana can see. The check is a failed query for the out-of-scope index and a successful query for the permitted one. Record the result with the role definition so an auditor or reviewer can reproduce it.

  7. Provision the data source as a file

    Write the data source definition, with the credential referenced from an environment variable or secret rather than stored inline, into a provisioning YAML file loaded at Grafana startup. Store that file in version control alongside the dashboard JSON. Restart or reload Grafana on a clean instance and confirm the data source appears without manual setup. The check is a rebuilt Grafana instance that shows the same data source and panel after startup, with no value of the credential present in the repository. Confirm the provisioning options for your Grafana version in the provisioning documentation before relying on a specific file layout.

How OpenSearch fields, index patterns and roles map to Grafana

This table maps each OpenSearch concept that a Grafana panel depends on to the setting that carries it, who decides it, and what to verify before dashboards reach users. Read it before building the data source, because a mismatch in the time field or field types usually shows up as empty or wrong panels rather than an error. Mixed dashboards with Prometheus panels add one more mapping, from label sets to variables.

MappingGrafana setting or behaviorWho owns the decisionWhat to verify
Index patternData source index name or pattern, matched to the indices the Grafana account can readOpenSearch platform team with the dashboard ownerPattern matches only intended indices and excludes restricted or system indices
Time fieldTime field set on the data source so panel time ranges filter documents on the time axisDashboard owner, with the log or event schema ownerField is a date type in the mapping and timestamps are in one time zone
Keyword fieldsAggregations, terms buckets and exact-match filters run against keyword fieldsIndex template ownerFields used for grouping are keyword typed, not analyzed text
Text fieldsFull-text matching in query strings; not reliable for grouping without a keyword subfieldSearch or log schema ownerDashboards group on keyword subfields and not on analyzed text
Field types in the pluginPlugin maps mapping types to query and aggregation options differently by versionGrafana administratorConfirm field type handling in the OpenSearch data source plugin documentation for your Grafana version
Service account rolesGrafana connects with an OpenSearch user or role that holds read permissions on chosen indicesOpenSearch security administratorRole grants only the needed index patterns and fields, and document-level filters apply as expected
Authentication methodBasic, token or client certificate settings configured on the data sourceSecurity engineeringCredentials are stored in Grafana secure settings and TLS verification is enabled
Prometheus label setsPrometheus labels exposed as Grafana template variables that filter both data sourcesObservability lead with the dashboard ownerVariable names and values match across both sources so panels filter the same services
Variable scope on mixed panelsVariables chained into OpenSearch queries and PromQL selectors on one dashboardDashboard ownerEach panel returns data after a variable change and no panel ignores the selection silently

Authenticating the Grafana OpenSearch data source to a secured cluster

A Grafana panel on OpenSearch is only as safe as the account it queries with and the Grafana instance that holds that account. The cards below cover the cluster side (identity, roles, transport and audit) and the Grafana side (credential storage and hardening), so both teams can review the same design.

Choose the login method for Grafana users

The OpenSearch Security plugin supports SAML, OpenID Connect, Active Directory and LDAP, Kerberos and JSON Web Token backends, but those settings govern who logs in to OpenSearch Dashboards, not the service account Grafana uses. Grafana's own login is a separate decision: SAML login to Grafana itself is limited to Grafana Enterprise and Grafana Cloud, so teams on the open-source edition should confirm which Grafana login method fits their identity provider before building dashboards. Confirm with the Grafana authentication docs which backends the data source accepts for its own connection.

OpenSearch security docs

Use a dedicated least-privilege role

Create a separate OpenSearch role for Grafana with read-only permissions on the index patterns its panels actually query, and map it to a dedicated backend user rather than an administrator. Add document-level and field-level restrictions where dashboards should not expose sensitive fields, and use field masking for values that must appear only in hashed or partial form. Review the role whenever a new dashboard needs an index, so access grows by decision rather than by default.

Encrypt the connection and pin the CA

Enable TLS for client traffic on the cluster so Grafana's queries and responses are not sent in clear text, then configure the OpenSearch data source in Grafana to trust the internal certificate authority that signed the cluster certificate. Disabling certificate verification to get a connection working hides a misconfiguration and should be treated as a finding. Record which CA bundle Grafana uses and who renews it, since an expired certificate will break every panel at once.

Keep credentials out of dashboards

The data source password or token should be stored in Grafana's encrypted data source settings or supplied through the environment, never typed into dashboard JSON or shared in exported dashboards. Provisioning files can reference secrets rather than embed them, so the same definition can move between environments. Check that exported dashboards and version history contain no credentials, and plan a rotation procedure for the Grafana service account.

Grafana provisioning docs

Audit Grafana's queries on the cluster

Grafana sends queries under its service account, so Dashboards users appear as one identity unless you check what the cluster records. Enable the audit log settings in the OpenSearch Security plugin for the Grafana account and confirm which request types are logged, since query volume can grow quickly. Decide where audit records are kept, how long they are retained and who reviews them, and test that a sample panel query appears in the log.

Harden the Grafana instance

Grafana's security hardening guidance recommends secure and SameSite cookies, a Content Security Policy, Trusted Types, hiding the version from unauthenticated users, requiring authentication for the metrics endpoint and domain verification against DNS rebinding. Apply these settings in the Grafana configuration and verify them after each upgrade, because a dashboard server reachable by many users is a common target. Treat the list as a checklist to confirm against your own environment rather than a complete security assessment.

Grafana hardening docs

Mixing OpenSearch and Prometheus panels on one dashboard

Placing OpenSearch log or event panels beside Prometheus metric panels helps when an incident needs both a metric spike and the log lines around it. The design question is whether the two sources can share one time range and one set of identifiers, and that needs planning before the first panel is built. Grafana lets you add an OpenSearch data source and a Prometheus data source to the same dashboard, but it does not reconcile their timestamps, retention or naming for you.

Prometheus is the first constraint to plan around. Its local storage is not clustered or replicated and should be run like any other single-node database, so a single Prometheus server is a single point of failure for the metric panels. Its default retention is 15 days, configurable by time or size, so an incident review that looks back further than that will find no metrics unless you add remote write to long-term storage. Prometheus also values reliability over precision, so its numbers are not the right source for anything that needs exact counts. Confirm the retention you configured against the period your post-incident reviews cover, and confirm where the samples go if you have added remote storage.

The OpenSearch side has different time behavior. Log and event documents are indexed by their own timestamp fields, and the indices they land in may be rolled over or deleted on a retention schedule you set separately. Prometheus label names such as service or instance will not match OpenSearch field names such as service.name or host.name by default, so agree on one naming convention and map the fields in the panel queries before the dashboard is shared. If alerting is part of the design, Alertmanager should run as a cluster for high availability, with Prometheus pointed at every instance, as described in the Alertmanager documentation.

Why Grafana panels fail after connecting to OpenSearch

This table lists the failures teams hit most often when Grafana queries OpenSearch, with the likely cause and the setting or log to check first. Work down the rows in order when a panel is empty, errors or duplicates alerts, since the first checks are usually the cheapest. Most failures come from the TLS trust chain, the role mapping, or the time field configured in the data source.

FailureLikely causeFirst setting or log to check
TLS certificate errorsGrafana does not trust the internal certificate authority that signed the cluster's HTTPS certificateThe CA certificate configured in the data source TLS settings, then the Grafana server log for x509 or certificate verification messages
401 or 403 responsesThe Grafana service user maps to a role that cannot read the index pattern or the fields used in the panelThe OpenSearch Security role and role mapping for the Grafana user, then the cluster audit log for denied requests
Empty panelsThe data source time field does not match the timestamp field in the index, or the dashboard time range has no matching documentsThe time field name in the data source configuration, then a raw query in Explore against the same index
Timeouts on wide rangesLong time windows or high-cardinality terms aggregations scan too many documents for the query timeoutThe panel query interval and terms size, the data source timeout setting, and the OpenSearch slow query log
Plugin and cluster version mismatchThe installed OpenSearch data source plugin does not support the cluster's OpenSearch versionThe plugin version in the Grafana plugin list against the cluster version in the OpenSearch release notes
Duplicate alert notifications in HATwo or more active Grafana servers evaluate the same alert rules without the additional alerting configuration in the HA docsThe alerting high availability settings on every node, and whether each notification fires once per cluster
Grafana Live limits in HALive streaming features are not fully supported across multiple active Grafana servers behind a load balancerWhether panels depend on Live streaming, and a fallback to scheduled refresh for those dashboards

Keeping Grafana, the plugin and OpenSearch versions aligned over time

Grafana and OpenSearch move on separate release clocks, so the version pairing you validated last quarter may not hold this quarter. Grafana publishes major releases yearly, minor releases about every other month and patch releases at least monthly. Each minor release is supported for 9 months, and the last minor release of a major version for 15 months. OpenSearch targets a new minor version about every eight weeks, and each version stays under maintenance until the next major version enters maintenance or one year passes, whichever is longer. Put both schedules on one calendar, and check the OpenSearch releases page and the Grafana upgrade guidance before each planning cycle to confirm the current support windows.

Write the upgrade order down before you need it. Test every Grafana upgrade, and any change to the OpenSearch data source plugin, against the target OpenSearch version in a staging environment that mirrors production security settings, including TLS, SSO and role mappings. Only then promote the change. Upgrade OpenSearch first when the target version is still in maintenance and your Grafana build supports it, and treat a Grafana major upgrade as its own change with a rollback plan. Confirm the plugin's compatibility statement for each pairing with the plugin documentation rather than assuming it carries over from the last release.

Keep a register that maps each dashboard and alert to the data source it uses, the index patterns, the OpenSearch endpoint, the service account and the time field settings. When a version changes, this register tells you which panels need retesting. Store provisioning files for data sources and dashboards in version control, so the datasources definitions, including URLs, auth settings and TLS references, are reviewed like code. Secrets should stay out of those files and come from your secret store. Grafana provisioning supports YAML files loaded at startup, so a rebuilt Grafana instance can be checked against the same repository.

What a Grafana OpenSearch integration costs and what it needs from your team

Does the Grafana OpenSearch data source plugin cost anything to use?

The supplied facts do not give a price for the OpenSearch data source plugin, so confirm its licensing before you plan a budget. Ask the plugin maintainers and Grafana Labs directly, and check the license file in the version you intend to install. Grafana itself is licensed under AGPLv3 since April 20, 2021, according to the Grafana Labs licensing page, which covers the open-source server you would run. Grafana Enterprise and Grafana Cloud are separate paid options with their own terms, and they are not required to run the open-source data source. Your recurring costs are usually the servers, database, load balancer, storage and the people who operate them, not a per-user license for the open-source build.

What makes a Grafana OpenSearch integration take more effort?

Effort rises with the number of data sources, the security model and the dashboards you need to rebuild. Each additional cluster or index pattern adds connection settings, role mappings and testing. A secured cluster with SAML, OpenID Connect or LDAP requires decisions about who can query which indexes, and Grafana's own authentication options differ by edition, so SAML and team sync need Grafana Enterprise or Grafana Cloud. High availability adds a shared MySQL or PostgreSQL database and load balancing. Mixing OpenSearch with Prometheus panels adds a second query language and a second set of access rules. Dashboards built in OpenSearch Dashboards or from older exports usually need rework to render correctly in Grafana.

How long does a first Grafana OpenSearch integration take?

Duration depends on scope and on how quickly access is approved. A single read-only data source against a cluster you already run can move quickly once credentials and a test index are available. Timing extends when security reviews, certificate authority details, role design or network path changes are needed. DeployOpen does not publish a timeline. Most engagements are fixed-scope, so the timeline and deliverables are agreed in writing before work starts, and the quote follows from that written scope. Ask any provider for the milestones, the approvals they assume you will give, and what happens if an approval is late.

What does our team need to provide for the integration?

Plan to provide the following before work starts:

  • Network and API access to the OpenSearch cluster, including the endpoints Grafana will reach
  • A named role owner who approves which indexes and fields each Grafana user or group can read
  • Certificate authority details for TLS, including the chain Grafana must trust
  • Sample dashboards or panels you want rebuilt, with the queries they depend on
  • Access to the Grafana host, database and any Prometheus instances involved

Confirm the exact authentication backend your cluster uses with the platform team, since the OpenSearch Security plugin supports several backends and the setup differs for each.

Can our internal team set up the Grafana OpenSearch integration alone?

Yes, for a single read-only data source on a cluster your engineers already operate. The steps are mostly configuration, and the OpenSearch data source documentation covers the connection settings. The work becomes harder when you add SAML, a high availability Grafana setup with a shared database, or panels that combine OpenSearch and Prometheus under one set of permissions. Those cases require decisions about identity, database sizing, alerting duplication and access boundaries, and mistakes can expose data across teams. An internal team can still do it, but it should assign an owner for security review and plan time for testing before any shared dashboard goes live.

Which parts of the integration recur after launch?

Some costs continue after the first dashboards go live. Grafana releases follow a published cadence: major releases once a year, minor releases every other month, and patch releases at least monthly, according to the Grafana upgrade guidance. Each minor release is supported for 9 months. Your team or a partner must test and apply those upgrades, review the OpenSearch data source version against your cluster version, and rotate certificates. Role and dashboard changes also recur as teams join or change. Budget for this ongoing operation, and ask any provider whether support and upgrades are covered by a retainer or billed per change.

What should we ask for in a quote for this integration?

Ask for a written scope that lists each data source, each authentication backend, the high availability design, every dashboard or panel to be rebuilt, and each Prometheus connection. Ask which items are one-time work and which are recurring retainers. Confirm who pays for Grafana Enterprise or Grafana Cloud if a feature needs them, and who confirms the plugin licensing. Ask what testing covers, including access tests for each role, and what evidence you receive for security and compliance reviews. Finally, ask what assumptions the timeline depends on, such as approval turnaround and access to test data.

How DeployOpen scopes and delivers Grafana and OpenSearch integrations

DeployOpen plans, builds, documents and supports Grafana dashboards on OpenSearch inside the client's own infrastructure. Each engagement starts with a written scope that names the data sources, users, authentication model and dashboards involved before any configuration begins.

How we scope

  • We list the OpenSearch indexes, dashboards and Grafana panels the written scope covers, with each one named.
  • We confirm which Grafana edition, authentication method and OpenSearch Security roles the target environment supports.
  • We agree on whether Prometheus panels, alerting or other data sources belong in scope, and mark anything excluded.

How we build

  • We configure the OpenSearch data source with TLS and a dedicated read-only service account scoped to required indexes.
  • We define data sources and dashboards as provisioning files so the setup can be reviewed, versioned and redeployed.
  • We test query performance, permission boundaries and dashboard behavior for each user group against the agreed scope.

How we hand over

  • We deliver written documentation covering the Grafana configuration, role mappings, query patterns and known limits.
  • We walk your operations and security teams through the authentication setup, secret locations and change procedure.
  • We provide a handover checklist listing items to confirm with your own teams before production use.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer alongside the fixed-scope engagement.
  • Retainer work can cover Grafana and OpenSearch version changes, reviewed against the vendors' published release and maintenance information.
  • Changes to dashboards or access rules go through the same written scope and review path used at delivery.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.