Zabbix database monitoring with agent 2 plugins

Zabbix agent 2 reads MySQL, PostgreSQL, MongoDB, MSSQL, Oracle and Redis through plugins, and some of those plugins must be installed separately. This page covers the setup sequence, the accounts and network paths it needs, and the failure points that stall a rollout.

On this page

How Zabbix database monitoring with agent 2 plugins reads your databases

Your team needs database health, availability and performance data in Zabbix without giving the monitoring path write access to any database. Agent 2 plugins fit that need. A plugin runs inside the Zabbix agent 2 process on the database host or on a host close to it. It connects to the engine with a read-only monitoring account, runs the status and statistics queries behind each item, and returns the results to the Zabbix server or proxy. Nothing in that path should need to create, alter or delete data, so grant the account only the access to statistics and status views that the plugin documentation for your agent version lists. Confirm those privileges there, then test them on a non-production instance before you grant them anywhere else.

Plugins come in two kinds. Built-in plugins ship inside the agent 2 binary. MySQL, Oracle and Redis are examples of this group, but the full list depends on your agent version, so confirm it in the Zabbix agent 2 plugins documentation before you plan. Loadable plugins are installed as separate packages after agent 2 is in place. Since Zabbix 6.0, the PostgreSQL, MongoDB and MSSQL plugins are in this group. Loadable plugins need a separate package, so add that install to your build and configuration management, and confirm the package name for your distribution and agent version. A host with agent 2 but without the loadable package will not return those items.

Do not confuse these plugins with the database that stores Zabbix's own data. Agent 2 plugins only read the engines you monitor. The Zabbix server and proxy still need a supported database backend of their own, and the supported versions for that backend are listed on the Zabbix requirements page. For Zabbix 7.4, that page documents MySQL or Percona 8.0.30 to 9.7, MariaDB 10.5 to 12.3 and PostgreSQL 13 to 18 for the server. Check the page for your release before you choose a version, and keep in mind that a PostgreSQL instance you monitor and a PostgreSQL instance that stores Zabbix data may have different owners, versions and access rules.

What Zabbix database monitoring needs before the first check

Six items must be in place before the first database check, spanning the Zabbix components, the agent host, the database engines and the connections between them. Most can be confirmed in a short review with the team that owns each component. Work through them in order, because the plugin, account and network checks depend on the versions you confirm first.

Matching Zabbix component versions

The Zabbix server, every proxy and agent 2 must run compatible releases, and the plugins you install must match the agent 2 version on each monitored host. Confirm the version of each component now, including proxies that collect from database hosts, and record the release line you will stay on. Zabbix 7.0 LTS has full support until 30 June 2027, which sets how long this setup stays on a fully supported line.

Loadable plugin packages

MySQL, Oracle and Redis are built into agent 2. PostgreSQL, MongoDB and MSSQL are loadable plugins that you install separately on each agent host. Confirm which plugin packages are present on every host that will run these checks, and that each package matches the agent 2 version it loads into. Ask your package owner where the packages come from and how they are updated alongside agent 2.

Plugin docs

Supported database engine versions

Check each database major version against its vendor's support window before you build items on it. PostgreSQL 14 reached end of support on November 12, 2026, and PostgreSQL 13 and earlier are unsupported, so any host still on those versions needs an upgrade plan before monitoring starts. Confirm the version of every engine in scope, including MySQL, MariaDB, Oracle, MongoDB, MSSQL and Redis, against each vendor's own published policy.

PostgreSQL versioning policy

Read-only monitoring account per engine

Each database engine needs its own read-only monitoring account, and no monitoring check should reuse an application login. Confirm the privileges each plugin needs against the plugin documentation, and grant nothing beyond them. Store the password in the agent 2 configuration or in a secret store that your security team reviews. Test each account from the agent host before the first check, so a failed login is not confused with a monitoring fault.

Network paths for each connection

Two paths must work: the Zabbix server or proxy to agent 2, and agent 2 to every database endpoint it queries. Confirm which side opens each connection for the item types you plan to use, because passive and active checks start from different sides. Document the port on every firewall between them, including any database listener or load balancer in front of the engine. Test each path from the host that opens it before you enable items.

Certificates where TLS is required

Where a database connection requires TLS, the agent host must trust the certificate authority that signed the database server certificate. Confirm each certificate covers the hostname agent 2 connects to, that it has not expired, and that its private key is readable only by the account that runs agent 2. If you use certificate-based login for PostgreSQL, the client certificate is part of the account setup, so plan its renewal together with the account.

PostgreSQL authentication methods

Built-in or loadable: which path each database takes

MySQL, Oracle and Redis ship inside the agent 2 binary, so there is no separate plugin package to add for them. The install work is the agent 2 package for your Zabbix release line, followed by connection settings for each database.

  • Install step: Install or upgrade the Zabbix agent 2 package from the same release line as your Zabbix server and proxies. No extra plugin package is needed for these three databases.
  • Configuration: Add the connection details for each database to the agent 2 configuration file, usually zabbix_agent2.conf, using the parameters in the plugin documentation for your version. Store the monitoring account password in the secret handling your policy requires, and confirm which options your version supports.
  • Upgrades: The plugin code moves with the agent 2 binary, so an agent 2 upgrade also updates the MySQL, Oracle and Redis plugins. Plan these databases inside the same change window as the agent.
  • Check after install: Confirm the agent 2 service starts, then run a manual check for each database item from the server or proxy. Review the agent log for unsupported item errors.

Before you finalize the design, check the built-in list for your agent 2 version in the plugin documentation, because plugin placement can change between releases.

The order to set up Zabbix database monitoring

Follow this order so each layer is proven before the next one depends on it: versions and plugins first, then the engine account, agent 2 configuration and network paths, and only then Zabbix hosts and templates. The sequence ends with items returning values and a trigger expression tested against live data. Skipping a check early tends to show up later as a host that reports unavailable with no clear cause.

  1. Confirm versions and the plugin list

    The DBA or platform owner lists every database engine and version in scope, the Zabbix server or proxy version, and the agent 2 version on each monitored host. Built-in agent 2 plugins include MySQL, Oracle and Redis, while MongoDB, MSSQL and PostgreSQL need separately installed loadable plugins. Check the agent 2 plugin documentation for your Zabbix version and the engine's support dates before you commit. Done when you have a written inventory that maps each instance to an agent host, a plugin and a supported version.

  2. Create a read-only monitoring account

    The database team creates one monitoring account per engine instance, granted only the read access the agent 2 plugin documents for that engine. Do not reuse an administrator login or a superuser role, and keep the account out of application schemas. Record the account name in the plan so the agent credentials step can reference it. Done when the account signs in from the agent host with the engine's own client tool and a write attempt with that account is refused.

  3. Install loadable plugins on agent hosts

    The platform team installs the separately packaged plugins for MongoDB, MSSQL and PostgreSQL on each agent 2 host that will query those engines, using the same Zabbix version as the agent. Built-in plugins need nothing extra at this step. Restart agent 2 only after the package is in place, then confirm the agent log shows the plugin loading without errors. Done when agent 2 restarts cleanly and its log shows no errors for the plugins you installed.

  4. Configure agent 2 connections and credentials

    The platform team adds one connection entry per engine instance to the agent 2 configuration on the matching host, pointing at the address, port and monitoring account created earlier. Store each password in a file readable only by the agent service account or in your secrets manager, and keep it out of configuration files that go into version control. Keep passwords out of item keys and plain-text host macros, and mark secret values as secret in Zabbix. Done when the engine's client tool connects from the agent host using the same parameters the agent will use, and agent 2 restarts cleanly.

  5. Open the network paths

    The network team opens only the paths the design needs: the agent 2 host to each engine's listening port, and the Zabbix server or proxy to the agent 2 listening port on each agent host. Confirm the connection direction for each path, because passive and active checks open connections in opposite directions. Limit each rule to named source and destination hosts where your firewall allows it. Done when a connection test from the Zabbix server or proxy reaches each agent port and the agent host reaches each engine port.

  6. Add hosts and attach templates in Zabbix

    The Zabbix administrator creates a host for each engine instance and links the agent 2 template that matches that engine. Set the connection and secret macros the template asks for, and point the host at the correct agent 2 interface and proxy. Read the template's own documentation for the exact macros on your Zabbix version, and confirm each value with the database owner before saving. Done when the host shows agent availability as available and the template's discovery rules create the items you expected.

  7. Validate items and trigger expressions

    The monitoring owner checks Latest data for each template and confirms that one item per engine returns a value before anything else is trusted. Then open one trigger that depends on a database metric and use the expression test in the trigger form against current data to confirm it evaluates as expected. Record any unsupported item and check the agent log and the engine's connection log for the cause. Done when every required item returns a value and one trigger test evaluates correctly on live data.

How a database check travels from Zabbix to the engine

The check starts at the Zabbix server or proxy, which sends a request down to Zabbix agent 2 on the monitored host. Agent 2 passes the item to a built-in plugin (MySQL, Oracle, Redis) or a loadable plugin (PostgreSQL, MongoDB, MSSQL). The plugin connects over the network path and runs its queries under the monitoring account on each database, and the values return up the same chain. Check three things: the server-to-agent link, the privileges granted to the monitoring account on each engine, and the firewall rules between agent 2 and the databases. Loadable plugins are installed separately, so confirm they are present on the host before you build the item.

Trust boundaries mark the server link, host, database accounts and network.

Which engine maps to which plugin and which version facts to check

This table maps each database engine to its agent 2 plugin path, the read-only monitoring privilege to create, and the version facts to check. Built-in plugins cover MySQL, Oracle and Redis, while MongoDB and MSSQL, like PostgreSQL, are loadable plugins installed separately. The main takeaway is that the Zabbix requirements page covers only the Zabbix server database, so the monitored engine's version must be checked against its own vendor support policy.

EnginePlugin pathMonitoring privilege to createVersion facts and what to confirm
MySQLBuilt in to agent 2A read-only account with the status and replication privileges listed in the MySQL plugin documentationZabbix requirements cover only the Zabbix server database. Confirm the monitored version in the plugin documentation and the vendor support policy.
PostgreSQLLoadable plugin, installed separatelyA read-only role, such as the built-in pg_monitor role, granted as the PostgreSQL plugin documentation describesCheck the PostgreSQL versioning policy: 14 support ended November 12, 2026, and 13 and earlier are unsupported. Zabbix requirements cover only the server database.
MongoDBLoadable plugin, installed separatelyA read-only user with the cluster monitoring role that the MongoDB plugin documentation specifiesConfirm supported MongoDB server versions in the MongoDB plugin documentation. The Zabbix requirements page does not cover monitored instances.
MSSQLLoadable plugin, installed separatelyA login with the server-state and metadata view permissions listed in the MSSQL plugin documentationConfirm supported SQL Server versions in the plugin documentation and Microsoft's lifecycle pages for each release you monitor.
OracleBuilt in to agent 2A monitoring account with the read-only dictionary view access listed in the Oracle plugin documentationConfirm the Oracle Database release and client library requirements in the plugin documentation and Oracle's support dates.
RedisBuilt in to agent 2A dedicated user or password with the read-only command access that the Redis plugin documentation describesConfirm the Redis server version and ACL support in the plugin documentation and the Redis release policy.

Security controls for database monitoring accounts and credentials

Database monitoring gives the Zabbix agent 2 plugins a login to each database and a path into your network, so the same decisions matter in two places: the account the plugin uses and the people who can read what it collects. The controls below cover both sides, from the database account and its TLS settings to who can see the results in the Zabbix interface.

Read-only monitoring accounts

Create a dedicated monitoring account for each database instance the plugin reads, and grant only the privileges each item key calls. Start from the plugin documentation for your version, then test each key against the account before you widen any grant. Avoid reusing an administrator or application login, because a plugin that holds that account can read or change data it never needed. Confirm whether the account can run the plugin's discovery items, which may query more objects than single-value items do.

Agent 2 plugin docs

Credential storage and visibility

Database passwords usually sit in host or template macros, in the agent 2 configuration file, or in an external secret store that your Zabbix version supports. Each location has its own reader list, so confirm before you store a password in a plain-text macro, since users who can open that host or template may see the value. Check the file permissions on zabbix_agent2.conf on each agent host, and confirm which Zabbix roles can edit hosts and templates. Record the answer for every instance so that credential rotation does not depend on memory.

TLS between agent 2 and databases

Encrypt the connection between agent 2 and each database where both the plugin and the database engine support it. Confirm TLS support per plugin, because the PostgreSQL, MongoDB and MSSQL plugins may express TLS settings and certificate paths differently in your version. Plan certificate issuance, renewal and trust store distribution to each agent host before go-live, since a lapsed certificate can stop collection. Test the handshake from the agent host with the same account the plugin uses.

PostgreSQL authentication methods

Set the authentication method for the monitoring role in pg_hba.conf as a deliberate decision. PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM for password logins, so find any roles that still store MD5 password hashes before you upgrade. Certificate, LDAP, GSSAPI and other methods remain documented, but each one adds an identity dependency that the monitoring path must reach during every collection cycle. Confirm which methods your agent 2 PostgreSQL plugin version supports before you choose one.

PostgreSQL auth methods

Network path to agent 2

Allow inbound connections to agent 2 only from the Zabbix server or the proxy that polls it. Block the agent listen port from user subnets, application networks and any other segment that has no reason to reach it. Decide per host whether checks run passively, actively or both, because that choice sets which side opens the connection. With active checks, the agent connects out to the server or proxy, so firewall rules and expected source addresses change. Document the path for your network team and your auditors.

Zabbix user authentication and roles

Decide how people sign in to the Zabbix frontend that shows database data. Zabbix supports internal accounts, HTTP, LDAP, SAML and multi-factor authentication, and LDAP or SAML can create a user on first login through just-in-time provisioning. Map roles to host groups so that each database team sees its own instances and nothing else. Keep super administrator membership small and review it on a fixed schedule. Confirm which login methods your version combines with multi-factor authentication.

Zabbix authentication docs

Why database checks fail after the first install

This table lists the failures that most often stop Zabbix agent 2 database checks after the first install, with the likely cause, what to check and the fix for each. Start with the plugin rows when an item is unsupported or returns no data, then check credentials and network paths before changing the template. Confirm each fix against the agent 2 plugin documentation for your Zabbix version before you change production.

FailureLikely causeWhat to checkFix and what to confirm
Plugin missing after an agent upgradeThe agent was upgraded, but the loadable plugin package was not upgraded alongside it.The plugin package version against the agent 2 version, and agent log lines about the plugin failing to load.Install the matching plugin package and restart agent 2. Confirm the version pairing in the agent 2 plugins documentation.
Loadable plugin not installed on the agent hostPostgreSQL, MongoDB and MSSQL are loadable plugins installed separately, while MySQL, Oracle and Redis are built in.Which plugin the item key belongs to, and whether that plugin package exists on the agent 2 host.Install the loadable plugin on the agent host and restart agent 2. Confirm which plugins your version ships as loadable.
Monitoring account lacks a privilegeThe account connects but cannot read the statistics or system views the plugin queries.Run the same query as the monitoring account in a database client, then read the agent log error.Grant the read-only privileges the plugin documents for that engine. Confirm the exact grants for your engine version in the plugin docs.
Engine version outside its support windowPostgreSQL 14 support ended November 12, 2026, per the PostgreSQL versioning policy, and older versions receive no further fixes.The server version reported by the database and its vendor end-of-support date.Plan a major upgrade or record a documented exception. Confirm which engine versions your agent 2 plugin supports in its docs.
Firewall blocks agent 2 to database trafficA rule allows agent to Zabbix server traffic but does not allow the agent 2 host to reach the database port.A connection test from the agent 2 host to the database host and port, and the database host allowlist.Open the database port from the agent 2 host only. Confirm the port and any listener settings in your database documentation.
TLS mismatchThe database requires encryption, or the plugin TLS settings do not match the server certificate or its trusted CA.Whether the server enforces TLS, and whether the certificate chain and host name match what the plugin expects.Set the plugin TLS mode and CA file to match the server. Confirm the TLS option names in the plugin docs for your version.
Credentials expire or rotateThe password or account expiry changed on the database, but the agent 2 configuration still holds the old credential.A manual login with the monitoring account, and agent log authentication errors that begin after the change date.Apply the new credential and restart agent 2. Confirm whether your version reads secrets from a store, and check any auth method change in your engine docs.
Items return no dataThe template or item key was written for a different plugin, engine or Zabbix version than the one running.The item key, the plugin it calls, and whether the item shows as unsupported in the host item list.Import the template for your engine and Zabbix version, then correct the key. Confirm key names in the template and plugin docs.

Keeping database monitoring working through engine upgrades

An engine upgrade can change two things the monitoring depends on: what the monitoring account is allowed to see, and whether the agent 2 plugin still supports the server version. The two upgrade types affect these differently. A PostgreSQL minor release never changes the internal storage format, so the update means replacing executables and restarting the service. Data files stay where they are, and the connection settings and monitoring role usually keep working. That makes a minor update a low-risk event for monitoring, but it is not a reason to skip checks. A restart can still leave an item unsupported if a grant was lost or the plugin version no longer matches the server. Treat each minor update as a change that needs a test.

Major upgrades change more of the monitoring path. A dump and restore with pg_dumpall builds a new cluster, so the monitoring role, its grants and any related database objects must be recreated and verified on the new cluster. With pg_upgrade, data files stay in place and the system catalog is migrated, but the new binaries and the plugin still need to be checked. Logical replication moves data to a new server, so the endpoint that agent 2 connects to changes, and the cutover is where monitoring breaks if the agent still points at the old host. The PostgreSQL upgrade documentation describes each method and the downtime it implies, so read it before choosing. Also note that PostgreSQL 14 support ended on November 12, 2026, so a server still on that major version needs a planned upgrade path now.

After every engine upgrade, rerun the item checks for each PostgreSQL item and confirm that each one returns a value and none is in an unsupported state. Then review the triggers that depend on those items, so a silent gap does not look like a healthy database. Also confirm that the agent 2 version and the separately installed PostgreSQL plugin both support the new engine release, because the plugin does not necessarily move in step with the server. Test every agent 2 upgrade first on a non-production copy of the database, using the same engine version as production and the same monitoring role. This is the cheapest way to find a broken grant or a changed connection setting before it becomes a gap in production monitoring. Record the results so the next upgrade starts from a known baseline.

Zabbix database monitoring questions buyers ask before hiring help

What makes a database monitoring project cost more or less?

The main cost drivers are the number of database engines and instances, how many loadable plugins must be installed, how the monitoring account is designed, the network and security review, and how much template tuning the environment needs. Zabbix states that its open source software has no license fee, so the cost is labor plus any support subscription you choose. Each engine adds its own connection method, permission model and templates, so ten PostgreSQL clusters take more work than one instance. PostgreSQL, MongoDB and MSSQL plugins are installed separately on agent 2 hosts, while MySQL, Oracle and Redis plugins are built in. Ask any provider to price each engine, instance, plugin install and tuning task as separate line items.

What costs are one-time and what costs recur?

Installation, plugin deployment, monitoring account creation, template tuning and the initial security review are one-time costs. Recurring costs include upgrades to new Zabbix and database versions, template updates after those upgrades, ongoing maintenance, and any paid Zabbix support subscription. Zabbix sells technical support separately from its open source software, in tiers named Silver, Gold, Platinum, Enterprise and Global, and each tier sets its own coverage and response times. Zabbix LTS releases arrive about every 1.5 years and receive five years of support, so plan an upgrade cycle. PostgreSQL also needs regular patching, since minor releases arrive at least every three months. Ask any provider to separate one-time work from a recurring retainer and to state which upgrades and template changes it covers.

How long does a Zabbix database monitoring setup take?

Duration depends on the number of engines and instances, the plugin installs, how quickly monitoring accounts are approved, and how fast the network and security review closes. No standard duration applies to every environment, so ask for a timeline only inside a written scope. A single engine on a standard network with a ready monitoring account moves faster than a mixed estate with MSSQL, Oracle and PostgreSQL across several sites, because each engine needs its own permission model and tests. Change windows set the pace for production work, since agent 2 restarts and plugin loads happen on hosts that serve applications. Ask for the planned phases, the dependencies on your teams, and the completion criteria for each phase.

What does the work need from our team?

Plan for access, change windows and named database owners before the work starts. The implementation team needs administrative access to the Zabbix server, any proxies and the agent 2 hosts, plus a named owner for each database engine who can approve the monitoring account and its read permissions. Change windows are needed for agent restarts, plugin loads and configuration changes on production database hosts. Your network team must confirm which ports and paths the agents and proxies can use, and your security team must review the monitoring login and how its credential is stored. Name one internal decision maker for the engagement, because permission questions slow down quickly when no one can approve them.

Can our own team set up Zabbix database monitoring alone?

Yes, a team with Zabbix and database administration skills can do it alone, since Zabbix is open source and its documentation covers the agent 2 plugins. The work is mostly configuration, so the key question is whether someone on your team understands each engine's privilege model well enough to design a monitoring account safely. Check three skills: operating Zabbix server and agent 2 on monitored hosts, administering each database engine, and reviewing network paths and credential handling. Teams that lack one of these often bring in an outside partner for design and review, then run the daily work themselves. Whichever path you choose, make sure the knowledge stays with your staff after the project ends.

What should a written quote for Zabbix database monitoring include?

A written quote should list each engine and instance in scope, the agent 2 hosts where plugins are installed, and which loadable plugins are required for PostgreSQL, MongoDB and MSSQL. It should describe the monitoring account design for each engine, the network and security review, and the template tuning work, along with a clear list of exclusions. Ask for the Zabbix version in scope and the support model, separating the open source deployment from any paid support subscription and its tier. Add the acceptance checks, the handover material, and how scope changes are priced. DeployOpen works from a fixed scope agreed in writing before work starts, and its quotes follow from that scope.

How should the Zabbix monitoring login be designed for each database?

Create a dedicated read-only login for each engine that can read only the status and statistics views the templates query, and never reuse an administrator account. The exact grants differ by engine, so confirm them against each plugin's documentation and your own database standards before you copy any sample script. Store the password in a secret store or in the agent 2 configuration with restricted file permissions, and rotate it on your normal schedule. For PostgreSQL, MongoDB and MSSQL, install the loadable plugin before testing the login from the agent host. Record which hosts can reach which engines, since network paths are part of the review. Ask the reviewing team to approve the login design in writing before the templates go live.

How DeployOpen scopes and delivers Zabbix database monitoring

DeployOpen scopes Zabbix database monitoring around the databases you run, the agent 2 plugin each one uses, and the Zabbix version your team will operate. Built-in plugins cover MySQL and Oracle, while PostgreSQL, MongoDB and MSSQL need separately installed loadable plugins, so that choice shapes the build. The work is delivered in your own infrastructure, with documentation and handover for your operators.

How we scope

  • The written scope lists each database engine, its version, and the agent 2 plugin that will collect from it.
  • Built-in plugins (MySQL, Oracle, Redis) and loadable plugins (PostgreSQL, MongoDB, MSSQL) are confirmed against your Zabbix version.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any work starts.

How we build

  • Install agent 2 and the required loadable plugins from your package sources, pinned to the Zabbix version you run.
  • Create a dedicated monitoring account per database, with grants limited to what each plugin needs.
  • Test connection, item keys, and triggers against a non-production instance before enabling them on production hosts.

How we hand over

  • Documentation covers the plugin list, connection settings, account grants, template versions and each host's item and trigger mapping.
  • Operators walk through the setup, the credential rotation steps and the upgrade checks for each plugin before handover.
  • Your team receives runbooks for adding a database, changing a plugin and troubleshooting a failed collection.

How we support

  • Ongoing support, plugin upgrades and continuous testing are available as retainers after handover.
  • Retainer work can cover Zabbix minor upgrades, new database versions and checks on plugin loading after each release.
  • Confirm whether your Zabbix subscription tier fits the database alerts you need, since vendor support is separate.

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.