Zabbix HashiCorp Vault monitoring

Connect Zabbix to HashiCorp Vault through the official Vault by HTTP template and the /sys/metrics endpoint, with a scoped service token and expiry checks. Learn what to prepare, configure and verify.

On this page

How Zabbix monitors Vault health and token expiry through /sys/metrics

A team running HashiCorp Vault that wants health, audit failure, leadership change and token signals in Zabbix does not need a custom script. The official Vault by HTTP template polls the /sys/metrics API endpoint with an HTTP agent, so Zabbix only needs network reach to Vault's API address and a token that Vault accepts for that call. The template authenticates with a Vault service token stored in the {$VAULT.TOKEN} macro. Token expiry is handled separately: the optional {$VAULT.TOKEN.ACCESSORS} macro takes a list of token accessors, and the template uses them to check time to live for those tokens. Leave it empty and you get the health, audit and leadership items without expiry checks.

The template covers process resources, audit log requests and failures, barrier, cache and core requests, leadership events, token counts and TTLs, and storage and replication discovery. Audit failures and leadership events are the signals most worth routing to on-call, because they point to a Vault that is refusing or losing requests or has changed active node. It requires Zabbix 7.4, with versions published for Zabbix 7.2 and 7.0, so confirm your server version before importing. Confirm also which items each version provides, since storage and replication discovery depends on the Vault edition and cluster mode you run, and test the service token's policy against /sys/metrics before you rely on the template.

Choose the service token and its policy deliberately. Create a dedicated token with a read-only policy that allows the metrics path and, if you use expiry monitoring, the token lookup needed for the accessors you list, and set a renewal or rotation plan that Zabbix's macro update can follow. Keep the token value in a Zabbix secret macro rather than a plain host macro, and limit which hosts and users can read it. Confirm the exact paths and capabilities against your Vault version's policy documentation, because the required permissions are the part most likely to be wrong on first import.

What you need before connecting Zabbix to Vault

The Vault template depends on four things lining up: the Zabbix release, the Vault release and edition your team runs, a network path from Zabbix to the Vault API, and a token that can read metrics and nothing more. Confirm each one before you import the template, because a mismatch in any of them shows up as empty items or failed HTTP checks.

Zabbix version alignment

The official Vault by HTTP template ships in versions for Zabbix 7.4, 7.2 and 7.0, and the 7.4 version is the one that matches the current template facts. Confirm which Zabbix release runs your server and proxies, then import the template built for that line. Check the Zabbix life cycle page for support dates before you commit, since a template on an unsupported release line leaves you without fixes.

Zabbix life cycle policy

Confirmed Vault release and edition

Your team must confirm which Vault release and edition it runs before choosing template settings, since the metric names and Enterprise-only counters differ by edition. Community Edition and Vault Enterprise expose different features, and Enterprise features need a license applied to the cluster. Record the exact version from the running binary, not from the installation plan, and compare it against the current release list.

Vault releases

Outbound network path to Vault

The Zabbix server, or the proxy that polls Vault, must reach the Vault API address on the listener port. Open the path from that host, not from your workstation, because polling runs from the Zabbix side. Ask your network team to confirm firewall rules, DNS resolution of the Vault address and any load balancer in front of a multi-node cluster. Test with a request from the polling host before you add the host in Zabbix.

TLS trust for the Vault listener

If the Vault listener uses a certificate from an internal certificate authority, the Zabbix host must trust that chain. The HTTP agent fails with certificate errors when the chain is missing, and disabling verification to get past the error hides the problem. Install the CA certificate in the trust store used by the Zabbix server or proxy, and confirm the certificate name matches the address in the host configuration.

Read-only service token policy

Create a dedicated Vault token for Zabbix with a policy that allows reading the /sys/metrics endpoint and nothing else. Store it in {$VAULT.TOKEN} as a secret macro, not in plain template text. If you plan to watch token expiry, collect the token accessors separately for {$VAULT.TOKEN.ACCESSORS}, and keep that list limited to tokens you own. Ask your Vault administrator to review the policy before deployment.

Vault template page

Ownership of the token lifecycle

The Zabbix service token will expire or be rotated, and when it does, polling stops silently unless someone is watching for it. Assign an owner for rotation, record the token's time to live, and add a Zabbix item or trigger that reports authentication failures. Agree on this before go-live, because the first missed rotation is usually the first time anyone looks at the monitoring of Vault itself.

Configuration sequence for the Vault by HTTP template

This sequence takes a Vault cluster from a dedicated read-only metrics token to a Zabbix host that collects health, audit, leadership, token and storage data. Each step ends with a check you can run before moving on. The Zabbix administrator and the Vault administrator share the work, and the result is a host whose items return data.

  1. Create a read-only policy for metrics

    The Vault administrator writes a policy that grants read access to the sys/metrics path and nothing else, using the vault policy write command. Keep the policy separate from operator and application policies so the Zabbix token cannot read or write secrets. Confirm the exact path and capability syntax against the Vault documentation for your release. The step is complete when vault policy read returns only the metrics rule and the policy is listed in the policy inventory.

  2. Issue a service token for Zabbix

    Create a service token bound to the metrics policy with vault token create, and record its time-to-live and renewal behavior as part of the design. Store the token in the secret store your team uses for Zabbix macros or a vault, not in a shared document. Confirm with your Vault administrator whether your cluster expects the token on the metrics endpoint by default. The step is complete when vault token lookup shows only the metrics policy and a request to the metrics endpoint with the token in the X-Vault-Token header returns metric lines rather than a permission error.

  3. Import the template for your Zabbix version

    Download the Vault by HTTP template from the Zabbix integration page and choose the version that matches your server. The published template requires Zabbix 7.4, and versions for 7.2 and 7.0 are also provided, so do not import a 7.4 file into an older server. Import it under Data collection, then Templates. The step is complete when the template appears with its item, discovery and trigger counts populated and the template version matches the server version you run.

  4. Set the token and URL macros

    On the host or template level, set {$VAULT.TOKEN} to the service token as a secret text macro so it is hidden in the interface. Set the Vault URL macro named in the template to the address of your active Vault endpoint, using the same scheme and port your listeners use. Confirm the macro names against the template's macro list, because naming can differ between template versions. The step is complete when both macros show as set in the host configuration, the token value is masked, and the HTTP agent item no longer reports a missing macro.

  5. Add token accessors for expiry monitoring

    Set {$VAULT.TOKEN.ACCESSORS} only if you want expiry tracking for specific tokens, and list the accessors of those tokens in the format the template expects. Accessors identify tokens without exposing their values, so they can be listed in the host configuration, but keep the list limited to tokens that matter for operations. Leaving the macro empty is a valid choice. The step is complete when the token TTL items return values for each listed accessor and an unknown or revoked accessor shows an error on its own item rather than breaking the whole template.

  6. Assign the host and run storage and replication discovery

    Create the host for the Vault node or load balancer endpoint, link the Vault by HTTP template, and assign the Zabbix proxy or server that can reach Vault. Then run the storage and replication discovery rules manually from their rule lists rather than waiting for the next refresh. The step is complete when discovered items and prototypes appear under the host for each storage or replication component and the discovery rules report no error in their status.

  7. Confirm items return data

    Open Latest data for the host and check process resource, audit request and failure, barrier, cache, core request, leadership, and token count items. Each HTTP agent item should show a recent value, and its error field should be empty. Where an item shows a permission or connection error, check the token policy, the URL, and the network path from the proxy before changing the template. The step is complete when every expected item category has a value and the triggers for leadership and audit failures evaluate without unsupported status.

How the service token and accessors map to Zabbix macros

The official Vault by HTTP template reads Vault's /sys/metrics endpoint with an HTTP agent, and the token that authorizes that call is held in the macro {$VAULT.TOKEN}. The macro is defined on the host or template in Zabbix, where its value is stored in the Zabbix database and can be marked as secret so the web interface hides it after entry. The token needs only the policy that lets it read the metrics path, so the metrics call does not need broader access to secrets. Confirm the exact policy text against the template version you install.

  • Where it lives: Set {$VAULT.TOKEN} on the host (or a host group template) so it is stored in Zabbix and not in the template export.
  • Secret type: Mark the macro as secret text so its value is masked in the interface after saving.
  • Least privilege: Grant the token read access to the metrics path only, and confirm that the policy is sufficient for the template's items.
  • Token type: Prefer a token with a defined time to live over a non-expiring one, and record its creation date in your change log.
  • Verification: Test the token with a direct request to the metrics path from the Zabbix server or proxy before relying on the item.

Before go-live, confirm that the macro is marked secret, that the token has only the access the metrics call needs, and that the item returns data from the proxy that will poll Vault.

Vault metric groups mapped to Zabbix items and triggers

This table maps each metric group in the official Vault by HTTP template to the Vault source it reads and the operational question it answers. Use it to decide which groups to alert on first and which need a Vault Enterprise license before they return data. Groups marked as Enterprise-dependent should be confirmed against your own cluster before you rely on them.

Metric groupOperational question it answersEnterprise feature needed to produce data
Process resourcesIs the Vault process healthy in terms of memory, CPU and runtime load on each node?No, expected on Community Edition as well
Audit log requests and failuresAre requests being recorded, and are audit devices failing to write?Confirm for your version and audit configuration
Barrier, cache and core requestsIs the encrypted barrier and core request path slowing or erroring under load?No, expected on Community Edition as well
Leadership eventsHas the active node changed, and did a leader election or step down occur?No, expected on Community Edition as well, if HA is configured
Token counts and TTLsHow many tokens exist, and how long until they expire?No, but expiry monitoring needs token accessors in {$VAULT.TOKEN.ACCESSORS}
Storage and replication discoveryWhich storage backends and replication clusters exist, and what state are they in?Replication items depend on Enterprise performance or disaster recovery replication

Securing the metrics token and the polling path

The Vault template authenticates to /sys/metrics with one service token, so that token is the main thing to protect. The cards below cover what the token may do, where it is stored, how the connection is verified, which Zabbix nodes can reach Vault, and how the token is replaced over time.

Read-only policy for metrics and lookups

Create a dedicated Vault policy for the Zabbix token that allows reads on the metrics endpoint and token lookup, and nothing else. The token needs to read its own metrics and, when you use token accessors for expiry monitoring, look up the tokens those accessors reference. It should not be able to read secrets, write policies or manage auth methods. Ask your Vault administrator to test the policy with a short-lived token before it goes into the Zabbix host macros, and confirm the exact paths against the Vault version you run.

Zabbix Vault template

Keep the token out of plain host text

The template reads the token from the {$VAULT.TOKEN} macro, and a macro set directly on the host is visible to anyone who can edit that host in Zabbix. If your security review requires it, store the value in a Zabbix secret store and reference it from the macro instead of typing it in plain text. Confirm which secret store options your Zabbix version supports and who can view or export host macros. Review the Zabbix security content for the wider controls.

Verify TLS to Vault

The HTTP agent should validate the certificate that Vault presents, including its chain and host name, so a token is never sent to a machine that only looks like Vault. Confirm which CA bundle the Zabbix server or proxy trusts and whether the certificate covers the name in the item URL. Avoid disabling verification to get the first poll working, because that change is easy to forget and hard to spot later.

Limit which Zabbix nodes can reach Vault

Only the Zabbix server, or the proxy that polls Vault, needs a network path to the Vault API address. Restrict that port with firewall or security group rules to those source addresses, and block the rest of the network. If you run a high availability server cluster or proxy groups, list every node that could take over polling, because a failover to a node outside the allowed list will quietly stop metrics collection.

Rotate the token on a schedule

Plan rotation as a routine task with an owner, not an emergency response. Create the replacement token with the same read-only policy, update the Zabbix macro, confirm that new items receive data, then revoke the old token. Record the token's creation and expiry in your change system. Because the template also watches token TTLs, a token that is close to expiring will show up as a problem before it fails, so check that the expiry alerts reach someone who can act on them.

Audit who can see and change the setup

Several people can affect the polling path: those who edit the template and host macros in Zabbix, those who manage Vault policies and tokens, and those who administer the Zabbix nodes and firewalls. Document who holds each role, and confirm that Zabbix user roles stop a monitoring operator from exporting macro values. Ask Vault for its audit log of token use so you can see when the Zabbix token authenticates and from where.

How a metrics poll travels from Zabbix to Vault

The poll starts at the Zabbix server or a proxy, where the HTTP agent item for the Vault by HTTP template reads the service token from the {$VAULT.TOKEN} macro and calls the /sys/metrics endpoint on Vault. The request crosses the trust boundary between the Zabbix network zone and the Vault network zone, so TLS and firewall rules on that path need review. Dependent items then parse the response into process, audit, leadership and token values that feed triggers. Check which component runs the poll before you open firewall paths.

The poll path from the Zabbix collector to Vault, with the trust boundary between the two zones.

Why Vault items stop updating and how to fix them

This table lists the failure points that most often leave Vault items in Zabbix without new data, with the cause and fix for each. Check the rows in order, since a template version mismatch or a missing token blocks everything else.

Failure pointCauseFix
Template version mismatchThe Vault by HTTP template imported does not match the Zabbix release, since the official template requires Zabbix 7.4 with separate versions for 7.2 and 7.0Import the template version for your exact Zabbix release and confirm the server version before re-importing
Token expired or lacking policyThe service token in {$VAULT.TOKEN} has expired or its policy does not allow reading /sys/metricsIssue a dedicated token with a read policy for the metrics path, store it in the macro as a secret, and confirm the expiry date
Wrong token accessors{$VAULT.TOKEN.ACCESSORS} lists accessors that are mistyped, revoked or belong to tokens you no longer trackRecheck each accessor against Vault, remove stale entries and confirm expiring-token items return values after the change
TLS certificate not trustedThe Zabbix server or proxy does not trust the certificate chain of the Vault listener, so HTTP agent requests failInstall the internal CA on the collecting host, confirm the chain with a test request, and avoid disabling verification
Standby nodes returning different resultsThe item points at a standby node, whose metrics can differ from the active node or lag behind itConfirm which node answers, point the item at a stable address such as a load balancer, and compare active and standby output during testing
Proxy cannot reach the Vault addressThe proxy collecting for the host sits in a network segment without a route or firewall rule to the Vault listener portTest the connection from the proxy host itself, open the required path, and check the proxy log for timeouts
Enterprise-only metrics empty on Community EditionSome metrics and features depend on Vault Enterprise licensing, so Community Edition returns no values for themCompare the metrics you need with your Vault edition, disable items that cannot return data, and confirm the edition with your Vault administrator

What a monitoring build for Vault includes and what it leaves out

A monitoring build for Vault covers the Zabbix side of the work: importing the official Vault by HTTP template, setting {$VAULT.TOKEN} to a dedicated service token, and deciding which token accessors go into {$VAULT.TOKEN.ACCESSORS} for expiry checks. It also covers tuning triggers so that expiring tokens and leadership changes reach the right people at the right severity, building dashboards for process resources, audit request and failure counts, barrier and cache activity, and token counts, and writing runbooks that tell an on-call engineer what to do when a problem fires. Each of these needs a decision from the client, such as which tokens are worth watching, who owns a leadership-change alert, and how long a warning gives a team to renew or rotate a credential. Those thresholds depend on the client's own token lifecycle, so they should be set with the people who own that policy.

The build leaves out the administration of the Vault cluster itself. Initialization, unseal procedures, storage backend operations, replication setup, upgrades and disaster recovery stay with the team that runs Vault, as does the token lifecycle policy: who may hold a token, maximum TTLs, renewal rules and revocation practice. Zabbix will show that a token is about to expire or that a standby has taken leadership, but it will not decide whether a token should exist. Licensing is also outside the build. Vault is offered as Community Edition, as licensed Vault Enterprise and as HCP Vault Dedicated, and the license terms and edition choice belong to the client and its counsel, not to the monitoring work. Confirm the current license terms and any Enterprise features you rely on directly with HashiCorp or IBM, and confirm the template's supported Zabbix version with the integration page before you start.

The Zabbix template is also not a substitute for Vault audit logging. The template reads counts of audit requests and failures from /sys/metrics, which tells you that something is failing, but it does not record who requested what, which path was accessed or what the outcome was for an individual secret. If your compliance or incident response depends on that record, you need Vault's audit devices configured, retained and reviewed in your own logging pipeline. Before handover, ask for a written list of what the build monitors, what it does not, and which alerts route to which owner, so the gap between metrics and audit evidence is documented rather than assumed.

Questions buyers ask before monitoring Vault from Zabbix

How long does it take to set up Vault monitoring in Zabbix?

The duration depends on how quickly the required access and approvals arrive, how many Vault clusters and Zabbix server or proxy paths are involved, and how much alert tuning the team wants before go-live. The core technical work is importing the official Vault by HTTP template, setting the macros, and confirming that items and triggers populate. Exact timelines should be confirmed in a written scope, where each phase, its dependencies and its acceptance checks are listed before work starts.

What do we need to provide before the engagement starts?

Plan to provide four things before the build begins:

  • Vault administrator access, or a named administrator who can create the monitoring policy and token.
  • Approval from your security owners for the token policy, including which paths the monitoring token may read.
  • Network changes that let the Zabbix server or proxy reach the Vault API endpoint, usually on the HTTPS listener.
  • Access to the Zabbix environment, including the version in use, so the template matching your release is chosen.

Confirm each item in the written scope, because approval cycles often take longer than the technical steps.

Can our in-house team set up Vault monitoring without a partner?

Yes, a team with Zabbix and Vault experience can do it, because the official Vault by HTTP template is designed for this path. The harder parts are usually policy and governance: writing a least-privilege token policy, deciding how token accessors are collected for expiry monitoring, and proving to auditors what the monitoring identity can read. A partner is most useful when those controls need to be documented and reviewed. Compare the internal effort, skills and review time against a fixed-scope quote.

What recurs after go-live, such as token rotation and template updates?

Several things recur. The Vault service token needs rotation under your secrets policy, and each rotation requires updating the {$VAULT.TOKEN} macro. Token accessor lists in {$VAULT.TOKEN.ACCESSORS} must stay current as service tokens are created and retired. Template updates are needed when you upgrade Zabbix, because the Vault template has versions for specific Zabbix lines, and Zabbix 7.4 is the version the current template requires. Ask whether your agreement includes ongoing upgrades and continuous checks, since DeployOpen offers these as retainers.

What drives the cost of Vault monitoring from Zabbix?

Cost follows the scope of the work and who is paid for it. The main drivers are the number of Vault clusters and environments, whether Vault runs in high availability with several nodes, how many access paths and approvals are involved, the depth of alert tuning and documentation, and the Zabbix version and topology you run. One-time costs cover design, build and handover. Recurring costs cover token rotation, template maintenance after upgrades and support. DeployOpen does not publish a price list, so request a quote based on a written scope.

Does the Vault monitoring token need broad permissions?

No, the token should be limited to what the monitoring needs. The template reads the /sys/metrics endpoint and, for expiry monitoring, token information tied to the accessors you list. Define a dedicated policy with read access to those paths only, avoid attaching it to administrative or human identities, and set a time-to-live that fits your rotation process. Have your security owners approve the exact policy before the token is created, and confirm with HashiCorp documentation how the metrics endpoint is protected in your Vault version.

Does Vault monitoring work the same way for Vault Enterprise and open-source builds?

The Zabbix template reads the same metrics endpoint, so the monitoring pattern is similar across editions, but the metric names and available counters depend on the Vault build and configuration you run. Confirm which Vault edition, version and storage backend you use before the template is tested, and verify that the leadership, audit and replication items you care about actually populate in your environment. Licensing terms for Vault itself are a separate decision that should be reviewed with your legal and procurement teams.

How DeployOpen works on this

DeployOpen plans and deploys Zabbix monitoring for Vault inside your own infrastructure, so the service token, the Zabbix hosts and the alert routing stay under your control. The work starts with a written scope that names the Vault clusters, the metrics and alerts you need, and the access your team can grant.

How we scope

  • Inventory the Vault clusters, nodes, listener addresses and the Zabbix server or proxy that will poll each one.
  • Agree which alerts matter most, such as audit log failures, leadership changes, token counts and expiring tokens.
  • Confirm the Zabbix version your team runs, since the Vault template requires Zabbix 7.4 with versions for 7.2 and 7.0.

How we build

  • Create a dedicated Vault policy and service token for /sys/metrics that grants read access only, and record its rotation owner.
  • Import the official Vault by HTTP template, set {$VAULT.TOKEN} through a secret store, and add token accessors to {$VAULT.TOKEN.ACCESSORS} for expiry checks.
  • Test the HTTP agent polling, discovery of storage and replication items, and trigger thresholds against each Vault node before production use.

How we hand over

  • Deliver a written configuration record covering hosts, macros, trigger logic, token ownership and the rotation procedure.
  • Walk your operations and security teams through the dashboards, problem views and the steps to follow when a trigger fires.
  • Document the Zabbix version and template version in use, so later upgrades can be planned against them.

How we support

  • Ongoing support, template updates and continuous testing are available as a retainer after handover.
  • Review the monitoring setup again when you upgrade Vault or Zabbix, since metric names and template versions can change.
  • Confirm with your team who receives alerts and how escalation works before any retainer scope is agreed in writing.

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.