Prerequisite
First time, we need two virtual machines with Ubuntu 18.04 and 3 IP for make high availability for Zabbix Server 3.4
- 1st server : zabbix-node01 – 10.0.0.1
- 2nd server : zabbix-node02 – 10.0.0.2
- Virtual IP* for HA – 10.0.0.3
What’s Virtual IP :
A virtual IP address (VIP or VIPA) is an IP address that doesn’t correspond to an actual physical network interface. Uses for VIPs include network address translation (especially, one-to-many NAT), fault-tolerance, and mobility. From Wikipedia
Step 1: Configure DNS
To optimize dns queries and avoid false positives, we need to configure our /etc/hosts on both servers.
Step 2: Install Zabbix Server
Add repository Zabbix on both servers
Install zabbix-server-mysql on both servers
We will separate the mysql server and frontend
Edit file /etc/zabbix/zabbix_server.conf on both servers
Step 3: Configure Pacemaker
Install pacemaker and pcs on both servers
Now only zabbix-node01, configure authentication
Then create cluster zabbixserver
Start cluster
if you have a problem please unmask the service pacemaker
On both servers, make sure that Pacemaker and Corosync are started at boot
Check cluster and nodes
Disable stonith and ignore low quorum
We need to create VIP for zabbixserver
Test your VIP and status of pcs
Disable zabbix-server on both servers, because Pacemaker will actually control the process
Create a new ressource Zabbix, to verify that the zabbix service still works in cluster
Check if ressource appear when you launch the command
Ensuring resources run on the same host
Test your cluster
1
|
sudo pcs cluster stop zabbix-node01
|
Comments
Post a Comment