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 policyConfirmed 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 releasesOutbound 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.
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.
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.
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.
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.
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.
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.
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.
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.
Expiry and time-to-live checks do not use the service token itself. The template reads {$VAULT.TOKEN.ACCESSORS} as an optional list of token accessors, which are identifiers for other tokens that Vault can report on without exposing the token value. Only the accessors you list are checked, so the macro defines the scope of expiry monitoring. Accessors are not secrets in the same sense as tokens, but they still identify credentials and should be handled as sensitive operational data.
- Purpose: The list drives token expiry and TTL items for the named tokens, which is how the template raises warnings before a token lapses.
- Scope control: Leaving the macro empty disables those checks, so add accessors deliberately for the tokens that matter to your applications.
- Ownership: Record which team created each accessor and which application depends on it, so a missed expiry has a named owner.
- Format: Confirm the expected list separator and format in the template documentation for your version before entering values.
- Maintenance: Remove accessors for tokens that are revoked, or the checks will report on credentials that no longer exist.
Check that each listed accessor resolves in Vault, that the expiry items show values, and that the warning thresholds match how far ahead your teams need notice.
The choice is between one dedicated monitoring token shared by all Vault hosts that Zabbix polls and a separate token for each Vault node or environment. A single token is simpler to create, rotate and document, and it fits a small cluster where all nodes are polled with the same identity. Separate tokens limit the blast radius of a leaked value and let you revoke one environment without affecting others, but they multiply rotation steps and macro entries. Neither option changes what Vault itself exposes through the metrics endpoint, so the decision is about credential management, not monitoring coverage.
- Single token: Fewer macros and one rotation event, but a leak affects every polled Vault host.
- Per-host or per-environment tokens: Narrower exposure and independent revocation, at the cost of more macro values to maintain.
- Separate environments: Production and non-production Vault clusters usually warrant separate tokens and separate Zabbix host groups.
- Governance: Ask your security team which option matches your secret handling standard and how they want credential use logged.
- Ongoing effort: Count the rotation steps each option creates over a year, including the macro edits and the verification after each change.
Before choosing, confirm how many Vault clusters Zabbix will poll, who owns the credentials, and whether your policy requires separate identities per monitored system.
Because the token lives in a host macro rather than in the template or host definition, rotation is a value change. You create a new token in Vault, update {$VAULT.TOKEN} on the affected host or host group, confirm that items resume collecting data, and then revoke the old token. The host, its items, triggers and history stay in place, so the monitoring record is not rebuilt. Accessor changes follow the same pattern and only affect expiry items. Plan the order of steps so the old token is not revoked before the macro is updated, or the metrics items will fail.
- Sequence: Create the new token, update the macro, verify collection, then revoke the old token.
- Scope of change: Updating a host group macro changes every host that inherits it, so confirm the inheritance before editing.
- Verification: Check that the metrics items show new values and that no authentication errors appear in the Zabbix problem or latest data views.
- Audit trail: Record the change in your change system, since the Zabbix interface shows who edited a macro but not why.
- Rehearsal: Practice the steps on a non-production Vault cluster before the first production rotation.
After each rotation, confirm that the old token no longer works, that the metrics items recover, and that the accessor checks still report the expected expiry dates.
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 group | Operational question it answers | Enterprise feature needed to produce data |
|---|---|---|
| Process resources | Is 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 failures | Are requests being recorded, and are audit devices failing to write? | Confirm for your version and audit configuration |
| Barrier, cache and core requests | Is the encrypted barrier and core request path slowing or erroring under load? | No, expected on Community Edition as well |
| Leadership events | Has 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 TTLs | How many tokens exist, and how long until they expire? | No, but expiry monitoring needs token accessors in {$VAULT.TOKEN.ACCESSORS} |
| Storage and replication discovery | Which 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 templateKeep 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 point | Cause | Fix |
|---|---|---|
| Template version mismatch | The 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.0 | Import the template version for your exact Zabbix release and confirm the server version before re-importing |
| Token expired or lacking policy | The service token in {$VAULT.TOKEN} has expired or its policy does not allow reading /sys/metrics | Issue 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 track | Recheck each accessor against Vault, remove stale entries and confirm expiring-token items return values after the change |
| TLS certificate not trusted | The Zabbix server or proxy does not trust the certificate chain of the Vault listener, so HTTP agent requests fail | Install the internal CA on the collecting host, confirm the chain with a test request, and avoid disabling verification |
| Standby nodes returning different results | The item points at a standby node, whose metrics can differ from the active node or lag behind it | Confirm 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 address | The proxy collecting for the host sits in a network segment without a route or firewall rule to the Vault listener port | Test the connection from the proxy host itself, open the required path, and check the proxy log for timeouts |
| Enterprise-only metrics empty on Community Edition | Some metrics and features depend on Vault Enterprise licensing, so Community Edition returns no values for them | Compare 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/metricsthat 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.

