This episode covers availability and recovery: building a Zabbix server HA cluster with active and standby nodes, HAClusterNodes configuration, failover behavior, plus database and configuration backups with a restore procedure for disaster recovery.

Up to episode 15, all our deployments used a single Zabbix server. That works well until the server dies — and then all monitoring dies with it, exactly when it's needed most. Episode 16 covers two answers to that problem: HA clusters for continuous availability, and disaster recovery to make sure data and configuration can be restored.
HA and DR are complementary partners. HA keeps the system alive when one node fails. DR preserves the ability to come back from zero — in another location, from backups. Both are requirements for Zabbix to be worth using on critical infrastructure.
A Zabbix HA cluster consists of two or more server nodes sharing one database. One active node processes all collection, while standby nodes monitor the active node's health. If the active node fails, one of the standbys takes over.
The advantage of this approach: no shared storage or dedicated load balancer is needed. All you need is an extra node and a database accessible to both nodes.
HA is configured in zabbix_server.conf on every node:
HANodeName=zabbix-server-01
HAClusterNodes=zabbix-server-01,zabbix-server-02HANodeName: this node's unique name, which must differ on each server.HAClusterNodes: the comma-separated list of names of all nodes in the cluster.The parameters HANodeName and HAClusterNodes tell the server who it is and who its cluster peers are. Once both nodes are running, the cluster forms automatically.
A standby node monitors the health of the active node and the database. When the active node fails, the standby waits a moment to confirm the failure is real, then takes over the active role and starts processing collection. This process is automatic, with no manual intervention.
zabbix_server -R ha_statusThe command zabbix_server -R ha_status shows the status of each node in the cluster. Monitor this output periodically — HA status is also available as an internal item for Zabbix to monitor itself.
The database is the heart of Zabbix — all configuration, history, and trends live there. Regular backups are the first priority. For MySQL:
mysqldump -uzabbix -p --single-transaction --routines --triggers zabbix | gzip > zabbix-backup.sql.gzThe --single-transaction option produces a consistent backup without locking tables. For PostgreSQL, use pg_dump; if you use TimescaleDB from episode 12, include a dump in a format that supports hypertable restore.
Store backups in a different location from the server — ideally outside the same location — and test the restore periodically.
Besides the database, back up the configuration that isn't stored in the database:
zabbix_server.conf and zabbix_proxy.conf files.zabbix_agent2.conf file and PSK keys on each host.Templates can also be exported as YAML files and kept in version control — an effective way to keep templates documented and restorable at any time.
Restoring means turning a backup back into a running system:
zabbix_server.conf to point at the restored database.gunzip -c zabbix-backup.sql.gz | mysql -uzabbix -p zabbixThe command gunzip -c zabbix-backup.sql.gz | mysql -uzabbix -p zabbix restores the backup contents to the database. Always document this procedure and practice it in a test environment before it's actually needed.
Architecture decisions can be staged:
Node A (active) ─┐
├── Database ── daily backup → off-site location
Node B (standby)─┘Define your RPO target (how much data loss is acceptable) and RTO target (how fast you must recover) from the start. These two numbers determine the backup frequency and the architectural complexity required.
Warning
All HA nodes share the same database. That database itself must be part of the DR strategy — HA only protects against server node failures, not against database corruption.
Episode 16 prepared Zabbix for worst-case scenarios: an HA cluster with active and standby nodes keeps collection running when one node fails, and database and configuration backups with a restore procedure ensure the system can be rebuilt from zero.
Key takeaways:
HANodeName and HAClusterNodes are the two core HA configuration parameters.In the next episode 17 we'll discuss performance tuning and capacity planning — adjusting caches and worker counts, database tuning, calculating NVP for sizing, and monitoring Zabbix's own health with internal checks.