Monitoring OpenBao with Prometheus and Grafana

A plan for scraping OpenBao's sys/metrics endpoint with Prometheus, choosing token and access settings, alerting on the right metrics and visualizing them in Grafana, in infrastructure you control.

On this page

Monitoring OpenBao with Prometheus and Grafana: what you get and when you need it

A running OpenBao cluster that nobody can see into is a risk you only discover during an incident. With Prometheus and Grafana in place, your operations and security teams can watch seal state, lease activity, request load and storage health on a timeline, set alerts on the conditions that matter, and show auditors how they know the cluster is healthy. Prometheus does the collection: it pulls metrics over HTTP from OpenBao's sys/metrics path, and it stores them in its own time series database. Grafana is the visualization layer, turning those series into dashboards that the platform and security teams can share.

The installation itself is the small part. The work that decides whether this monitoring is useful is the access model, the retention period and the alert design. OpenBao's telemetry endpoint can expose metrics without authentication only when that is explicitly enabled, and the active node and standby nodes do not report the same view, so you need to decide which nodes Prometheus scrapes and which token it uses to do so. Prometheus keeps local data for a default retention of 15 days, which may be shorter than your incident review or audit window, so you need to decide where longer history goes.

Before you build dashboards, confirm three things in your own environment: which OpenBao version you run and whether your metrics settings match that version's documentation, who owns the Prometheus and Grafana servers, and which alerts must page someone at night. Prometheus does not present itself as a clustered, replicated store, so a single Prometheus server is a single point of failure for your monitoring unless you plan for it. Grafana's own high availability needs a shared MySQL or PostgreSQL database, which is an extra component to size and back up. Treat the monitoring stack as production infrastructure from the start.

Which scrape and access options fit your OpenBao setup

The metrics endpoint can return its data in the default format or in the Prometheus format, selected with the format parameter on the request. Choose the Prometheus format when Prometheus is the scraper, because your scrape configuration, relabeling rules and PromQL expressions are written against its metric names and labels. Keep the default format only when another collector already parses it.

  • Scrape configuration: Set the format parameter in the params block of the scrape job so every target returns the same shape.
  • Alert rules: Metric names and labels in the output must match your PromQL rules, so test them against one target before you roll out the job.
  • Mixed collectors: If a second agent scrapes the same path, confirm that it expects the same format.
  • Version changes: Recheck the format values after each upgrade, because output details can change between releases.

Confirm the accepted format values and the default in the OpenBao telemetry documentation for the exact version you run, then verify that one scrape returns the metric names your alert rules use.

How to set up the Prometheus scrape for OpenBao step by step

This sequence takes a running OpenBao cluster from telemetry settings to a verified Prometheus scrape. Each step ends with a check, so the team knows the metrics path works before alerts or dashboards depend on it.

  1. Confirm telemetry and listener settings

    The platform engineer reviews the OpenBao server configuration on each node and confirms that the telemetry stanza is present and that the listener serving the API is reachable from the Prometheus host. Confirm the exact telemetry key names and the Prometheus output option in the OpenBao configuration documentation for your version, because they differ between releases. Check that the listener uses TLS if your policy requires it. The step is done when a configuration check passes and the API listener answers on the network path Prometheus will use.

  2. Decide how Prometheus authenticates

    The security engineer chooses between two access models for the metrics path. Unauthenticated access is a configuration setting that lets any caller on the network read metrics, which is simpler but exposes operational detail. The alternative is a token or other auth method that Prometheus presents on each scrape. Record the decision and the reason in your runbook, and confirm the setting names with the OpenBao authentication and telemetry documentation. The step is done when the team has a written choice that the security review accepts.

  3. Create a least-privilege policy and scrape token

    The OpenBao administrator writes a policy that grants read access only to the metrics path, then creates a token or auth role bound to that policy. The policy should not grant access to secrets, auth configuration or system endpoints beyond the metrics path. Store the token in a file that only the Prometheus service account can read, and set a renewal or rotation plan. The check is a policy review that confirms no broader capability is attached, and a token lookup that shows only the metrics policy.

  4. Test the metrics endpoint with the token

    Before touching Prometheus, the platform engineer requests the metrics endpoint directly from the Prometheus host, using the scrape token and the format parameter the telemetry documentation describes for Prometheus output. Use curl with the token in a request header and the CA certificate if TLS is in use. Expect an HTTP 200 response and plain-text metric lines beginning with the OpenBao metric name prefix. A 403 response points to policy or token problems, and a connection error points to listener or network problems. The step is done when a 200 response returns metric text.

  5. Configure the Prometheus scrape job

    The monitoring engineer adds a scrape job to the Prometheus configuration file. The job sets the metrics path to the OpenBao system metrics endpoint under the API prefix, passes the Prometheus output format as a query parameter, and references the token file through the authorization settings. Add the CA certificate and server name under TLS settings when the listener uses TLS. List every node or use service discovery, and confirm how standby nodes respond before relying on them. Validate the file with the Prometheus configuration check and reload the server.

  6. Set retention and storage sizing

    The platform engineer sets how long Prometheus keeps its own samples. Prometheus stores data in local two-hour blocks with a write-ahead log, and its default retention is 15 days, configurable by time or size. The local store is not clustered or replicated, so it needs its own backup and disk planning. Decide the retention for OpenBao metrics based on your investigation and audit needs, and confirm the sizing with your own sample rate. The check is that the configured retention flag is active and that the storage metrics report expected disk use after a few hours of scraping.

  7. Verify targets and run sample queries

    The monitoring engineer opens the Prometheus targets page and confirms that each OpenBao target shows as up with a recent last scrape time and no error text. Then runs a query for the up series filtered to the OpenBao job, and a second query for a core OpenBao metric to confirm that values change over time. If a standby node shows no OpenBao series, compare that with the active-only behavior described in the telemetry documentation before treating it as a fault. The step is done when every expected target is up and the sample queries return data.

How Prometheus, OpenBao and Grafana exchange metrics

The flow starts at each OpenBao node, which exposes its metrics on sys/metrics behind a token. Prometheus pulls from every node over HTTP and keeps samples in its local time series database for the configured retention. Prometheus hands alerts to Alertmanager, and Grafana reads the stored series with PromQL. The trust boundary sits around the metrics token and the listener: check who can reach the listener and which token Prometheus holds.

Prometheus pulls OpenBao metrics with a token, stores them locally, and feeds Alertmanager and Grafana.

Which OpenBao metrics are worth alerting on first

Start with a small set of alerts that show whether OpenBao can serve requests, whether the cluster has a healthy leader, and whether Prometheus can still see the server at all. Each category below is a place to begin, and each one should be mapped to exact metric names in the output of your own OpenBao version before you write any rule.

Sealed or unhealthy state

A sealed node cannot serve secrets, and every client that depends on it fails at once. Alert on the seal status metric for each node and treat any sealed node in a production cluster as an incident, not a warning. Also check the health endpoint status that your load balancer uses, so the alert matches what clients actually experience. Confirm the exact metric name against the metrics output of your OpenBao version.

HA docs

Leadership and standby problems

In a high availability cluster, one active node holds the lock and standbys forward or redirect requests. Alert when the cluster reports no active leader or when leadership changes repeatedly within a short window, since frequent elections usually point to storage latency or network trouble between nodes. Confirm the leadership and standby metric names for your version and storage backend, because Raft and PostgreSQL may expose different series.

Storage latency

Every write to OpenBao passes through its storage backend, so slow storage shows up as slow secret reads, slow lease operations and unstable leadership. Track latency quantiles for storage operations and alert when they stay high for a sustained period, not on a single spike. The right threshold depends on your Raft disks or PostgreSQL host, so set it from a baseline you collect in your own environment.

Request error rates

Rising 4xx or 5xx response counts on the API show that clients are failing, whether from expired tokens, permission changes or a server-side fault. Alert on the ratio of errors to total requests rather than raw counts, because raw counts grow with traffic. Separate client errors from server errors so that a burst of denied requests does not hide a real outage. Confirm the request and response metric labels in your version before building the expression.

Lease and token pressure

Dynamic secrets create leases, and a growing lease count can exhaust storage or signal a client that never renews or revokes. Watch the total number of active leases and token counts over time, and alert on sustained growth that does not match your expected workload. This is also the signal to review before a bulk revocation, since a large lease backlog changes how long revocation takes. Confirm the lease and token gauges for your release.

Scrape failures

If Prometheus cannot scrape OpenBao, every other alert goes silent without warning. Alert on the built-in up series for the OpenBao target, and on scrape errors for the job, so that a failed token, a changed listener or a network rule is caught quickly. Scrape failures are often the first sign that the metrics path or authentication changed after an upgrade, so check them after every OpenBao release.

How retention time and Prometheus storage shape your monitoring design

Prometheus keeps its samples on the local disk of the server that scrapes them, so the retention settings you choose decide how far back your OpenBao telemetry can be queried and how much disk you must provision. Prometheus writes data into two-hour blocks backed by a write-ahead log, and the default retention is 15 days. You can set retention by time or by size, and the size limit is the safer control when disk is fixed. For OpenBao, the question to settle early is how long an investigator needs to see seal status, request rates and token or lease activity after an incident. Ask your security team for that window before you size the volume, and confirm the retention flags against the Prometheus storage documentation for the version you run.

Local storage is not clustered or replicated. If the Prometheus server fails, the data on its disk is the data you have, so manage it like any other single-node database: back up the data directory, monitor free disk, and plan how a replacement server would resume scraping. If you need history longer than local retention, remote write sends samples to an external long-term store, and remote read lets Prometheus query that store. Remote storage adds a system with its own cost, access controls and retention policy, and it must be covered by the same data handling rules as the audit logs it summarizes. Confirm which metrics leave your environment before you enable it.

Prometheus values reliability over precision, and the project says it is not the right tool where every event must be counted exactly. Treat OpenBao metrics as operational signals, not as the audit record. Audit logging in OpenBao is the evidence your compliance team relies on, so do not design dashboards or alerts that assume counters are complete for accountability. Finally, if you run more than one Alertmanager, point Prometheus at every instance instead of a load balancer, as the Alertmanager documentation describes, so that alerts still fire when one instance is down.

Securing the metrics endpoint and the monitoring stack

The metrics endpoint describes your secrets infrastructure, so it needs the same access discipline as the cluster itself. The cards below cover who can read it, where it listens, how traffic is protected in transit, and how the Grafana front end is hardened.

Restrict who can read sys/metrics

Reading sys/metrics should be limited to the Prometheus token and to operators who need it. Create a dedicated policy that grants read on sys/metrics only, attach it to a token or auth role used by Prometheus, and avoid reusing broad operator policies. Ask your OpenBao team to confirm which auth method issues that token, how long it lives, and who can read the policy. Rotate the token on a schedule you set and after any staff change, then confirm Prometheus picks up the new value without a failed scrape gap.

OpenBao auth docs

Keep the metrics path off public listeners

Metrics reveal cluster state, seal status, request volumes and internal names, which helps an attacker plan. Bind the OpenBao listener that serves sys/metrics to the monitoring network or a management interface, not to a public load balancer or an internet-facing address. Check each node's listener configuration and any ingress rules that might expose the path. Test from outside the monitoring subnet to confirm the endpoint is unreachable.

Encrypt Prometheus to OpenBao traffic

A bearer token sent over plain HTTP can be captured by anyone on the network path. Configure TLS on the OpenBao listeners that Prometheus scrapes, and set the Prometheus scrape job to use HTTPS with the correct CA bundle and server name. Decide whether client certificates are required for the scrape job, and record that decision with the certificate owner. Watch for certificate expiry, because an expired certificate stops scrapes silently until someone notices a flat graph.

Harden Grafana cookies and content policy

Grafana's hardening guidance recommends secure and SameSite cookies, a Content Security Policy, Trusted Types, and domain verification against DNS rebinding. Set cookies to secure and an appropriate SameSite value when the site runs behind HTTPS, enable a Content Security Policy that matches the plugins you actually use, and confirm the configured root URL matches the hostname users type. Test dashboards and alert pages after each change, since a strict policy can break panels that load external assets.

Grafana hardening docs

Hide versions and require authentication

Grafana can reveal its version to unauthenticated visitors, and the metrics endpoint can be left open by default in some setups. Hide the version from unauthenticated users and require authentication for Grafana's own metrics endpoint, so that scanners cannot match your build to known advisories. Confirm these settings in the configuration file used by each Grafana node, since HA deployments must match across all nodes.

Plan for Enterprise-only identity features

According to the Grafana authentication docs, SAML, team sync, active sync and SCIM provisioning are available only in Grafana Enterprise and Grafana Cloud. If your identity policy requires SAML sign-in, group-based team membership or automated deprovisioning, confirm this before design starts, because the open-source edition supports LDAP, generic OAuth, Entra ID, Okta, GitHub, GitLab, Google OAuth, auth proxy and JWT. Ask Grafana Labs for current licensing terms, since they change.

Grafana auth docs

Questions teams ask before monitoring OpenBao with Prometheus and Grafana

What does it cost to monitor OpenBao with Prometheus and Grafana?

Prometheus has no paid enterprise edition, so the cost comes from four places: the servers and storage that run Prometheus, Alertmanager and Grafana, the implementation work, and the people who operate the stack after go-live. Infrastructure and storage recur every month and grow with the number of targets, the scrape interval and the retention period. Implementation is usually a one-time cost tied to the written scope, such as the number of OpenBao clusters, the alert routing and the dashboards. Ask any partner for a quote that separates one-time build work from recurring operations, and state which Grafana edition and hosting model the quote assumes. Grafana's own licensing and pricing pages should be checked against the edition you choose.

How long does it take to set up OpenBao monitoring?

The duration depends on how many OpenBao clusters are involved, whether a token and policy for Prometheus already exist, how alert routing must match your on-call process, and whether dashboards and alert thresholds need agreement with the owners of the platform. A single cluster with an existing Prometheus server and Grafana instance is a small job. Multiple clusters, a new Prometheus deployment, a high availability Grafana setup backed by MySQL or PostgreSQL, or approval steps for credentials add time. Agree the duration in writing as part of a fixed scope, and ask for the milestones that depend on your teams, such as access grants and review of alert rules.

Can our internal team set up OpenBao monitoring without a partner?

Often yes, if the team already runs Prometheus and Grafana and has someone who can write PromQL and manage a token policy. The hard parts are less about installing software and more about choosing what to alert on, keeping the scrape token narrowly scoped, and deciding how to handle telemetry that is only exposed on the active node. Check whether your team has capacity to maintain Prometheus storage, since local storage is not clustered or replicated and must be managed like a single-node database. A partner is most useful when the team needs a reviewed alert set, a documented runbook and a repeatable deployment for several clusters.

What do we need to provide for OpenBao monitoring?

You need to provide access to the OpenBao clusters and their configuration, a named owner who approves the token policy that Prometheus uses, and decisions about storage and networking. On the storage side, decide the retention period, whether long-term storage through remote write is required, and where Prometheus and Grafana will run. On the network side, confirm which hosts can reach the OpenBao listeners, how Prometheus authenticates, and whether Alertmanager runs as a cluster. You also need a contact for alert routing, such as on-call rotations and chat or paging channels, and someone to approve dashboards and thresholds before they go live.

Should we use Grafana Cloud or self-host Grafana for OpenBao metrics?

Self-hosting fits better when the metrics, dashboards and alert data must stay in your infrastructure, or when you already operate a database and load balancer for Grafana. Grafana Cloud fits better when you want to avoid running the Grafana service yourself and can accept its hosting model. For self-hosting, Grafana stores configuration in SQLite by default, but the installation docs say SQLite does not scale for production, so MySQL or PostgreSQL is required for production and high availability. Grafana's high availability setup uses two or more active-active servers behind a load balancer, and alerting needs extra configuration to avoid duplicate notifications. Compare the Grafana pricing page with your data residency rules before deciding.

Does Prometheus provide a supported way to make OpenBao metrics highly available?

Prometheus does not cluster or replicate its local storage, so a single Prometheus server is a single point of failure for metric history. Teams that need continuity usually run redundant Prometheus servers or send samples to external long-term storage through remote write. Alertmanager can run as a cluster, and Prometheus should be configured to point at every Alertmanager instance rather than at a load balancer. Confirm the design with your own availability goals before the build starts, because the choice affects cost, query behavior and alert duplication.

Which OpenBao metrics should we alert on first?

Start with the signals that show whether the cluster can serve secrets and whether Prometheus can still see it: scrape failures, an unhealthy or sealed node, loss of the active node, and rising error or latency counters on the request path. Then add alerts that match your use of OpenBao, such as lease counts that grow faster than expected for dynamic secrets, or storage metrics that show pressure on the data store. Confirm metric names against the telemetry your OpenBao version exposes, and test each alert with a known failure before relying on it. Keep the first set small so the on-call team can act on every page.

Is Prometheus accurate enough for every OpenBao usage measurement?

Prometheus values reliability over precision and is not a good choice where 100% accuracy is required, such as per-request billing. For OpenBao, use its metrics for operational health, capacity planning and alerting. If you need an exact record of who read which secret, rely on OpenBao's audit devices instead of metric counters. Document this boundary in the runbook so that compliance and security reviewers understand which data source answers which question.

How the monitoring work is scoped and delivered

DeployOpen scopes OpenBao monitoring as a fixed-scope engagement with written deliverables agreed before work starts. The scope names the OpenBao cluster or clusters, the Prometheus and Grafana instances that will run in your infrastructure, the nodes and endpoints to be scraped, and the alerting destinations your operations team already uses. A quote follows from that written scope, so the first step is an inventory of what exists today, including whether Prometheus or Grafana is already deployed and which of them your organization has approved.

The deliverables usually cover five areas. The first is the scrape configuration for the sys/metrics path, including the format parameter and the decision on whether metrics are read from the active node only. The second is the token and policy design, which sets up a dedicated, narrowly scoped token for Prometheus rather than reusing an administrative token. The third is the retention and storage plan for the local time series database. The fourth is the alert rules, Grafana dashboards and their provisioning as code. The fifth is a handover to your operations team, with runbooks and a walkthrough of what each alert means and how to respond. Ask the provider to list each deliverable, the environment it lands in, and who signs off on it.

Ask for the acceptance criteria in writing as well. A scoped engagement should state how the team will confirm that scraping works from every node, that the token can read only the metrics it needs, that retention matches the value your team agreed, and that an alert fires and reaches the right person during a test. Confirm the support model that follows handover, since in-house ownership of Prometheus, Alertmanager and Grafana is a recurring cost, and ongoing retainers are priced separately from the initial build.

How DeployOpen works on this

DeployOpen plans, builds and hands over OpenBao monitoring inside your own infrastructure, with Prometheus collecting the telemetry and Grafana showing it. The work is scoped in writing first, so your security, platform and operations teams agree on what is monitored, who can read it and what alerts mean before anything is deployed.

How we scope

  • Written scope lists which OpenBao nodes, metrics paths and Prometheus targets are in and out of the engagement.
  • We agree whether metrics stay on the internal network and who holds the token Prometheus uses to read them.
  • Scope names the Grafana edition, the database behind it and the alert destinations your on-call team uses.
  • Engagements are fixed-scope, so deliverables and timelines are agreed before work starts and quoted from that scope.

How we build

  • We configure Prometheus to scrape the OpenBao telemetry path with the format setting your team chooses and check each target.
  • We set the retention period and storage sizing for your Prometheus server and document what happens when it fills.
  • We build Grafana dashboards for seal status, leadership, request rates, errors and storage health, with alerts routed through Alertmanager.
  • We test that alerts fire on controlled failures in a non-production environment before production sign-off.

How we hand over

  • You receive the Prometheus and Grafana configuration files, dashboard definitions and alert rules in version-controlled form.
  • Runbooks explain each alert, the first checks to run and the escalation path to your OpenBao administrators.
  • We document the token scope, its rotation procedure and where it is stored, so your team can renew it without us.
  • Knowledge transfer sessions walk your engineers through the setup, using your environment as the worked example.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover Prometheus and Grafana version upgrades, checked against the release notes before each change.
  • We can review alert noise and thresholds after a period of production use, as agreed in the written scope.
  • Support can extend to retesting the monitoring setup after OpenBao upgrades or changes to the network path.

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.