Zabbix HA Cluster

Zabbix HA Cluster ensures that two redundant zabbix servers are operational one in Active
& other in standby
state to ensure HA and Fault Tolerance. To configure HA Cluster we will make the following changes :
Node -1
Components installed on node 1
Zabbix Dashboard
Zabbix Database
Zabbix Server
Node one was wokking as the AIO based model and we will extend the server nodes. We will edit the config file
sudo nano /etc/zabbix/zabbix_server.conf
We will change the parameters HANodeName
& NodeAddress
parameter to enable HA Cluster
HANodeName = zbx-server-node1
NodeAddress = <HOST_IP>:10051
We will save & exit the file and restart the service and HA cluster will be enable and we will move forward in adding servers section.
sudo systemctl restart zabbix-server
Node -2
On node 2 we will just install the zabbix server by following the installation steps on the OEM documentation page
Zabbix InstallationAfter installing the zabbix server we will configure the following changes inside the conifig file :
sudo nano /etc/zabbix/zabbix_server.conf
We will make the following changes :
# Database config
DBName = <database name>
DBUser = <database user>
DBPassword = <password>
DBHost = <database-IP>
#HA config
HANodeName = zbx-server-node2
NodeAddress = <HOST_IP>:10051
After saving the file we will start the services and the failover HA server will be present in the Reports > System Information
page on the zabbix dashboard.
sudo systemctl enable zabbix-server
sudo systemctl start zabbix-server
Resources
Note :
Zabbix HA only supports single shared database server and to ensure HA we will need to setup the database HA individually.
Only one server is active at a time and once the server fails the standby server will take the precedence as the master server to ensure HA
Adding Hosts in HA
By default the zabbix agents have capabilities to report to 2 servers at the same time so we will make the following configuration changes :
sudo nano /etc/zabbix/zabbix_agent.conf
## OLD
Server = 100.100.100.100
Server Active = 100.100.100.100
# New Changes
Server = 100.100.100.100,100.100.100.101
ServerActive = 100.100.100.100;100.100.100.101
After changes are made we will restart the services to apply the changes.
sudo systemctl restart zabbix-agent
Last updated