Storing Zabbix secrets in HashiCorp Vault or CyberArk

Zabbix can read database passwords and secret macros from an external vault instead of storing them in its configuration. This page explains the supported options, caching behavior, the proxy encryption requirement and what to confirm before rollout.

On this page

Storing Zabbix secrets in HashiCorp Vault or CyberArk: what it changes

Zabbix supports external vault lookups, so database passwords and secret macros can be read from a vault at runtime instead of being stored in Zabbix configuration. The move changes where the secret value lives and who rotates it, but it does not change how Zabbix uses it. Host names, macro names, item keys, templates and the vault path or reference that Zabbix points to stay in Zabbix. The secret value itself, for example the password for the server's database connection or a macro holding an API token, is fetched from the vault and cached by the components that need it.

Teams usually take this step for one of three reasons: an audit finding that flags plaintext credentials in a monitoring tool, a rotation requirement that a manual edit in the Zabbix frontend cannot meet on schedule, or a decision to give secret ownership to a central security or identity team. Each reason implies a different scope. An audit finding may be satisfied by moving only the database credentials, while a rotation requirement usually covers every secret macro that integrations depend on. Confirm which secrets your auditors and rotation policy actually name before you start.

The vault is a separate system that your organization operates, and Zabbix only becomes a client of it. That means someone owns its availability, its access policies, its audit trail and its upgrades, and a Zabbix server that cannot reach the vault cannot refresh those values. Before you commit, confirm the vault product you will run, whether it is a self-managed HashiCorp Vault edition, a licensed Enterprise cluster or CyberArk, and check the vault-side license and support terms with the vendor, since these are separate from Zabbix licensing.

Which vault option fits your environment

HashiCorp Vault comes in three forms that you should keep separate in your planning. Community Edition is available as binaries or source. Vault Enterprise is licensed software you run yourself. HCP Vault Dedicated is a managed service that runs the same binary as self-managed Vault Enterprise. The licensing context matters: HashiCorp announced on August 10, 2023 that future releases would move to the Business Source License 1.1, and the Vault LICENSE file names IBM as licensor for Vault 1.15.0 or later. IBM completed its acquisition of HashiCorp on February 27, 2025.

  • Community Edition terms: Read the current LICENSE file and the BSL 1.1 terms against your intended use, especially if you plan to offer Vault to others as a hosted or embedded service.
  • Enterprise features need a license: Performance and disaster recovery replication, HSM support, namespaces, seal wrapping, FIPS compliance and MFA are applied to the cluster with a valid license, so confirm which ones your design depends on.
  • Managed service scope: For HCP Vault Dedicated, confirm where the service runs, who operates it and how it connects to your Zabbix servers and proxies.
  • Pricing: HashiCorp does not publish Vault Enterprise prices for self-managed buyers, so request a written quote through sales.

Before you choose an edition, confirm with HashiCorp and with Zabbix which Vault version and engine your Zabbix release supports.

How Zabbix caches vault values on server and proxy

Zabbix fetches vault macro values on each configuration refresh and caches them, so a rotated secret reaches monitoring only at the next refresh. Before you rotate a database password or a secret macro, confirm how often your configuration refreshes in your installation and plan the change window around that interval, not around the moment the secret changes in the vault. During the gap, checks that use the old value will fail, and the failures will look like connectivity or authentication problems in the database, not like a vault issue. Test the rotation on a non-production host first and watch the item errors until the new value is picked up.

By default, the server hands vault-sourced macro values to its proxies, so the proxy never needs its own path to the vault. That is usually the simpler design: one network route and one set of vault credentials, held by the server. The alternative is to configure a proxy to fetch secrets independently. Choose that only when a proxy sits in a segment where the server should not be the path to the vault, and accept the consequences: the proxy then needs its own network route to the vault, its own vault credentials and its own rotation handling, and each of those is another place for access to fail or be over-broad.

Zabbix logs a warning when server to proxy encryption is not enabled, and vault values travel from the server to the proxy in that exchange. Treat that warning as a blocking finding for any proxy that receives vault-sourced values, and confirm the encryption setup before go-live. Ask your vendor or check the Zabbix secrets documentation for the exact behavior of each proxy mode in your version, and record which mode each proxy uses in your configuration inventory so that rotation and access reviews cover every place a secret is cached.

How secret values flow from the vault to Zabbix

The flow starts at the vault, which holds the secret values. The Zabbix server fetches macro values on each configuration refresh and caches them, then passes them to proxies over the server-to-proxy channel unless a proxy is set to fetch its own copy. The frontend reads database credentials from the vault and can cache them only when $DB['VAULT_CACHE'] is enabled. Check that server-to-proxy encryption is on, since Zabbix logs a warning when it is not, and check which path each credential takes.

General illustration of how vault values reach Zabbix components.

Why server to proxy encryption is required before you move secrets

Secret macro values reach proxies over the same server to proxy channel that carries configuration, so that channel must be protected before any value is moved into a vault. The cards below cover the warning Zabbix logs, the channel itself, the proxies that fetch on their own, the logs that may repeat values and the certificate or PSK setup that has to exist first.

Warning when encryption is off

Zabbix writes a warning to its log when server to proxy encryption is not enabled. Treat that warning as a blocking finding for this project, not background noise. Before you move any secret, confirm that the server and every active proxy agree on an encryption mode, and check the server log for the warning after each proxy restart or configuration change.

Zabbix secrets docs

Unencrypted secret transit

Vault macro values are fetched by the server and passed to proxies with the configuration they need. Without encryption on that link, a value that was safe in the vault would travel in clear text across the network between the server and the proxy. Confirm that the link between the server and each proxy is inside a network segment you control and that encryption is active on it before values are distributed.

Proxies that fetch independently

A proxy can be set to fetch vault values on its own instead of receiving them from the server. That changes the trust boundary: the proxy then needs its own vault access, credentials and network path to the vault. List every proxy in your design and record whether it receives values from the server or fetches them, because each independent proxy is another system that holds vault access.

Exposure through logs and diagnostics

Secret values can end up in places that are harder to control than the configuration itself, such as debug logs, support bundles and copied configuration files. Review the logging level on the server and proxies before rollout, restrict who can read those files, and test that a configuration dump does not reveal a resolved value. Ask your Zabbix partner to confirm which outputs contain resolved values in your version.

Certificate or PSK prerequisites

Encryption between the server and proxies depends on either pre-shared keys or certificates being issued, distributed and matched before it can be turned on. Plan that setup as its own work item, with owners for key or certificate issuance, renewal and revocation. Teams that skip it often disable encryption later to get a deployment working, which removes the protection the vault move depends on.

Configuration options and when each fits

This table compares the three ways Zabbix can use a vault: server-fetched macro values passed to proxies, proxies fetching values on their own, and frontend database credential caching. Read each row against your network paths, the number of credentials you want to keep in the vault, and how quickly a rotated secret must take effect.

OptionWhen it fitsTrade-offWhat to confirm
Server fetches macros, passes to proxiesProxies sit in segments where direct vault access is not allowed or not wanted, and you want one vault client configuration on the server.Secret values travel from server to proxy, so server to proxy encryption must be enabled. Zabbix logs a warning when it is not.Encryption is active on every server to proxy path, and the vault is reachable from the server only.
Proxy fetches macros independentlyProxies are in separate networks or sites where each may reach the vault directly and you want values to stay off the server to proxy path.Each proxy needs vault connectivity and its own credentials, which increases the number of identities to issue, rotate and audit.Each proxy can reach the vault, its vault role is limited to the secrets it needs, and rotation is tested on every proxy.
Frontend database credential caching off (default)Most deployments, where the web frontend reads the database credential from the vault on each use and nothing is cached in the configuration file.Every frontend lookup depends on vault availability, and vault outages can affect the web interface.Vault reachability from every frontend node and how the team handles a vault outage during business hours.
Frontend credential caching enabled with VAULT_CACHEYou accept a cached copy of the database credential in exchange for fewer vault calls and less dependency on vault uptime at each request.Cached credentials remain usable from the cache copy until they are refreshed, so rotation timing and cache exposure need explicit handling.How the cache is set by $DB['VAULT_CACHE'] = true in zabbix.conf.php, who can read that file, and how a rotated password is picked up.
Vault instance hosting modelSelf-managed Community Edition, self-managed Enterprise or a hosted service may each fit different license and operating models.Licensing and support terms differ by product, and HashiCorp states that its Enterprise prices are sales-led.License terms, support level and hosting location confirmed with the vendor or licensor before design work starts.
Vault storage backendIntegrated storage (Raft) suits most single-organization designs, while PostgreSQL may suit teams that already run it well.The backend sets failover, backup and restore steps, and some external backends have limited support.Which backends the chosen vault version supports for high availability and that backups restore into a test vault.

Setup sequence for moving Zabbix secrets into a vault

This sequence moves database passwords and secret macros out of Zabbix configuration and into a vault in a controlled order, so each change can be checked before the next one depends on it. The result is a Zabbix installation where secret values live in the vault and the server, proxies and frontend read them through a least-privilege identity.

  1. Inventory secret macros and database credentials

    The Zabbix administrator and the database owner list every place a secret sits today: secret text macros and vault-eligible macros on hosts, templates and global scope, the server database user, any proxy database users, and the frontend database credentials in the frontend configuration file. Each item gets an owner, a consumer (server, proxy, frontend or a template) and a rotation contact. The check is a signed-off list where every secret has a named consumer, so nothing is missed when the old values are removed.

  2. Confirm the vault product and version

    The platform owner checks the vault product and version against Zabbix's documented secrets support before anything is configured. Confirm which engines and authentication methods the current Zabbix release supports, and confirm your licensing position for HashiCorp Vault or CyberArk, since the choice affects who you contact for support and how upgrades are handled. Read the current Zabbix secrets documentation for the exact supported products. The check is a written record of the product, version and engine that will be used, approved by the security owner.

  3. Create the vault path and a least-privilege identity

    The vault administrator creates a dedicated secrets path for Zabbix and a separate identity for each consumer, such as the server and each proxy that fetches its own values. Each identity gets read access only to the paths it needs, with no write or list rights on unrelated paths. Store the identity credentials in a way that Zabbix can read without placing them in plain text in the configuration. The check is a test read from each identity that succeeds for its own path and fails for other paths.

  4. Enable server to proxy encryption

    The Zabbix administrator enables encryption between the server and each proxy before vault values are sent to proxies. Vault macro values are fetched on each configuration refresh and cached, and proxies receive them from the server unless they are set to fetch values independently. Zabbix logs a warning when server to proxy encryption is not enabled, so treat that warning as a blocking issue. The check is that the proxy shows an encrypted connection to the server and the warning no longer appears in the server log.

  5. Configure the vault connection and macros in Zabbix

    The Zabbix administrator adds the vault connection in the Zabbix configuration, pointing to the vault address and the identity created earlier, then changes each secret macro to reference the vault path instead of storing the value in Zabbix. Change one macro group at a time, starting with a non-production host or a single template, so a wrong path is caught early. The check is that each changed macro resolves to the expected value in a test item or a host macro preview, and the old stored value is removed.

  6. Enable frontend credential caching only if needed

    The Zabbix administrator decides whether the frontend must read database credentials from the vault at all. Frontend database credential caching from a vault is off by default and is turned on with the VAULT_CACHE setting in the frontend configuration file. Enable it only when the frontend needs the vault-held credentials and you accept that cached values exist on the frontend host, and document that decision with the security owner. The check is a frontend login and page load that works with the setting in place, plus a note in the change record explaining why caching was enabled or left off.

  7. Verify with a configuration refresh and a credential failover test

    The Zabbix administrator forces a configuration refresh and confirms that the server and each proxy pick up the vault values without errors in their logs. Then the platform owner rotates one test credential in the vault and checks that the change reaches the server and proxies on the next refresh, without a manual edit in Zabbix. Record the rotation time and the refresh result. The check is a clean refresh with no vault or encryption warnings, a successful rotated credential, and a documented rollback step for each change.

Security and operational considerations after the move

Once secrets sit in a vault, Zabbix depends on that vault for every configuration refresh and for frontend database logins. The controls below cover the identity Zabbix uses, how rotation reaches running components, what the vault records, where cached credentials sit, and how the vault itself is recovered.

Scope the identity Zabbix uses

Zabbix server, proxies and the frontend each read secrets with whatever identity your vault configuration gives them. Create a dedicated vault identity per consumer, grant it read access only to the paths that consumer needs, and keep it out of human accounts. Check that a proxy fetching independently is only allowed the secrets for its own hosts, since a broad token on a proxy in a less protected network widens the blast radius. Confirm the exact authentication method and policy syntax for your vault product in its own documentation before you write the policy.

Zabbix secrets docs

Plan rotation and its cache effect

Vault macro values are fetched on each configuration refresh and then cached, so a rotated secret reaches the server on its next refresh, not at the moment you change it in the vault. Proxies that receive values from the server get them on the server's schedule. Rotate in an order that keeps the old credential valid until every consumer has refreshed, then revoke the old one. Test the sequence on a non-production instance and confirm the refresh interval in your installed version.

Audit access in the vault

Zabbix can only show who changed a macro inside Zabbix. Reads of secrets happen in the vault, so enable the vault's audit device and send its logs to your central logging platform. Record which identity read which path and when, and alert on reads from unexpected hosts or outside the refresh pattern. Confirm the audit log format and retention for your product and edition with the vendor, and make sure the log itself cannot be altered by the identities it records.

Limit frontend cache exposure

Frontend database credential caching is off by default. When you enable $DB['VAULT_CACHE'] = true in zabbix.conf.php, the web host keeps a copy of the database credentials, so the file system and process memory of that host become part of the secrets boundary. Restrict read access to the configuration file and the cache location to the web server user, keep the frontend's database account narrow, and decide with your security team whether the trade-off of avoiding a vault call on each login is worth that exposure.

Back up and recover the vault

Zabbix cannot poll vault-backed macros or log in to its database through the frontend without the vault, so a vault outage stops the monitoring that depends on it. Document the unseal or recovery process, keep encrypted backups of the vault storage and its recovery material in separate locations, and rehearse a restore into a test environment. Ask the vault vendor which backend, high availability and disaster recovery features apply to your edition and what they require to be licensed.

Keep the vault platform current

The vault is a separate product with its own release cycle, licensing and support path, so it needs its own patch and upgrade plan. Check the vendor's release notes and security advisories for the version you run, confirm that your Zabbix version works with the vault API you use, and record who approves a vault upgrade. Review the license terms of the product you choose, since licensing changes have affected this category of tool.

Questions buyers ask before moving Zabbix secrets to a vault

What does it cost to move Zabbix secrets into a vault?

The cost depends on how many secrets, hosts, proxies and vault instances are in scope, and on whether a vault already runs in your environment. Costs fall into two groups: the work itself (scoping, configuring the vault lookup on the server and proxies, testing, cutover and documentation) and the vault platform (licensing, hosting and staff time). For the vault platform, HashiCorp states that Vault Enterprise prices are not published and direct buyers are referred to sales, so ask for a written quote that separates one-time work from recurring licensing and support. Ask for the number of secret macros and database credentials covered, the proxies involved and the test environment required.

How long does a secrets migration take, and what sets the duration?

Duration is set by inventory quality, the number of Zabbix components that read credentials, and how many change windows you can use. The main drivers are the count of secret macros and database entries, whether proxies fetch secrets through the server or independently, how many environments (test, staging, production) must be validated, and whether the vault itself needs to be built or hardened first. Agree on a timeline in the written scope, and ask the provider to name the dependencies, such as access approvals and network changes, that could move it.

What must our team provide before a vault migration starts?

Your team needs to provide working access to the vault with a dedicated, least-privilege identity for Zabbix, a list of every secret macro and database credential in use, and network paths from the Zabbix server, frontend host and proxies to the vault endpoint. You also need change windows for the server, the frontend and each proxy, plus an owner who can approve policy changes in the vault. Confirm with the vault team whether the Zabbix frontend will reach the vault directly, because frontend credential caching is a separate setting that changes what must be reachable.

Can our own team move Zabbix secrets without a partner?

Yes, if your team has staff who administer both Zabbix and the vault and can test changes outside production. The work is mostly configuration and verification, but mistakes are costly: a wrong path or policy can stop data collection or lock out the frontend. Teams usually struggle with proxy behavior, because the server and proxies handle vault values differently, and with the rollback plan. Decide early whether you need outside help for design review, testing or cutover, and whether that help is fixed-scope or ongoing.

How does secret rotation work after the move?

Once a secret is in the vault, Zabbix fetches macro values on each configuration refresh and caches them, so rotation in the vault reaches Zabbix on the next refresh rather than through a Zabbix edit. Your rotation process should therefore change the secret in the vault, confirm the server picks up the new value, and then confirm each proxy has the value, since proxies receive values from the server unless they are set to fetch independently. Database credentials used by the frontend are cached only if you enable that setting, so rotation for the frontend needs its own test and a restart plan. Document who owns each rotation and how it is verified.

Do CyberArk and HashiCorp Vault need different work?

Yes. The Zabbix side uses the vault connection and lookup settings for each supported engine, so the configuration, authentication method and secret paths differ between products. CyberArk and HashiCorp Vault also have different licensing, deployment models and admin tooling, which changes who approves access and how policies are written. Before choosing, confirm in Zabbix's secrets documentation which engines your version supports, and ask your vault team which identity and policy model they already run. Licensing for HashiCorp Vault is covered in its own section, and the same questions about cost and ownership apply to CyberArk.

How DeployOpen scopes and delivers secret vault integration for Zabbix

DeployOpen starts every vault integration with a fixed scope agreed in writing before any change is made to a Zabbix server, proxy or frontend. The scope names the secrets in scope, the vault product and edition, the Zabbix version, and the deliverables and timeline. Most of the review happens before the build: an inventory of where secrets currently live, including database passwords in the server and frontend configuration, secret macros on hosts and templates, and any proxy that fetches its own values. That inventory decides how many secret paths, policies and identities the vault needs, and it is the basis for a quote.

The vault choice is made during scoping, not during the build. HashiCorp Vault and OpenBao are both options, but the client's licensing position, support model and whether they run Vault Enterprise features such as replication or HSM support will change the design. Under the Vault license terms, the client's legal team should confirm whether their use fits. DeployOpen implements the integration inside the client's own infrastructure, including server to proxy encryption, the $DB['VAULT_CACHE'] setting in zabbix.conf.php if frontend credential caching is required, and the access policies that let Zabbix read only the paths it needs. Verification covers a test of a changed secret, a check that proxies receive values as designed, and a review of Zabbix log output for warnings.

Handover includes the configuration as built, runbooks for rotating secrets and recovering the vault, and the evidence the client's security and compliance teams will ask for. An optional retainer can cover ongoing support, upgrades and continuous testing after handover. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. The client's internal or external auditors assess whether the controls meet their requirements, so the scope should record which controls the evidence is intended to support.

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.