Configure automated failover between Zabbix server nodes with the native Zabbix server HA cluster.
Preventing downtimes is as vital for a monitoring solution as it is for any other component of an organization’s IT infrastructure. High availability and automated failover can help you prevent unwanted downtimes by supporting multiple application nodes and failing over between them once a primary node has failed.
Deploy native Zabbix server High availability cluster:
- Deploy two or more Zabbix server nodes
- No external tools are required to deploy a Zabbix server HA cluster
- Define custom failover delay before failing over to another node
- Monitor the status of your Zabbix cluster on Zabbix dashboards
Check out the video to learn how to deploy the Zabbix server High availability cluster:
How to deploy the Zabbix server High availability cluster:
- Deploy two or more Zabbix server nodes
- On all cluster nodes open the Zabbix server configuration file – zabbix_server.conf
- On all cluster nodes provide arbitrary node name in the HANodeName parameter
- On both nodes provide the node address in the NodeAddress parameter
- Open your Zabbix frontend configuration file – zabbix.conf.php
- Comment out the //$ZBX_SERVER and $ZBX_SERVER_PORT parameters
- From the active node check the HA cluster status with zabbix_server -R ha_status command
- Open your Zabbix frontend GUI
- Navigate to Reports → System information
- Confirm the Zabbix server HA cluster node status
Tips and best practices:
- Specifying the HANodeName parameter in the Zabbix server configuration file enables the HA cluster mode
- The NodeAddress parameter is used by the Zabbix frontend to connect to the active cluster node
- Zabbix frontend configuration file parameters – $ZBX_SERVER and $ZBX_SERVER_PORT must be commented out for the frontend to automatically detect the active cluster node
- The current status of the HA cluster can be managed using the dedicated runtime control options
Tags: ha cluster high availability
About Arturs Lontons
Zabbix Certified Expert & Trainer
View all posts by Arturs Lontons
Hi Arturs,
thank you for this blog article.
The question is: what’s about cluster awareness in zabbix_sender utility?
What is the best practice when a “Zabbix trapper” item type is used?
Currently you may run into a connection error whenever you explicitly specify a standby node as the Zabbix sender destination (-z option)
I would instead suggest pointing the Zabbix sender to a Zabbix agent configuration file instead ( -c option)
Note that the Zabbix agent ServerActive parameter syntax now supports specifying multiple cluster nodes:
https://www.zabbix.com/documentation/6.0/en/manual/appendix/config/zabbix_agentd
Once you prepare the configuration file, Zabbix sender should be able to pick out the active node from the node list in the Zabbix agent configuration file.
Hi Arthurs,
Thank you for video. Lets assume we have 3 node in HA. Two of in private network , one of in public provider.
In case of network connectivity problem between onprem – cloud service, how cluster will act?
I assume, onprem nodes are still keep working and stay as Active (Cause they have no problem with local server monitoring.)
And also Public Node will be become a active node for itself, cause it wouldn’t connect Active nodes in private.
How cluster desicion work for this situation?