Skip to main content

High Availability (HA) Zabbix Server on CentOs 7

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

Comments

Popular posts from this blog

How to remove zabbix-agent from Ubuntu 16.04 (Xenial Xerus)

Uninstall zabbix-agent To remove just zabbix-agent package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal: sudo apt-get remove zabbix-agent Uninstall zabbix-agent and it's dependent packages To remove the zabbix-agent package and any other dependant package which are no longer needed from Ubuntu Xenial. sudo apt-get remove --auto-remove zabbix-agent Purging zabbix-agent If you also want to delete configuration and/or data files of zabbix-agent from Ubuntu Xenial then this will work: sudo apt-get purge zabbix-agent To delete configuration and/or data files of zabbix-agent and it's dependencies from Ubuntu Xenial then execute: sudo apt-get purge --auto-remove zabbix-agent

Install Zabbix Agent on Suse Linux and Configure

Install taken from Suse –  http://software.opensuse.org/download/package?project=server:monitoring&package=zabbix-agent For SLE 12 SP1 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_12_SP1/server:monitoring.repo zypper refresh zypper install zabbix-agent For SLE 12 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_12/server:monitoring.repo zypper refresh zypper install zabbix-agent For SLE 11 SP4 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_11_SP4/server:monitoring.repo zypper refresh zypper install zabbix-agent For SLE 11 SP3 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_11_SP3/server:monitoring.repo zypper refresh zypper install zabbix-agent To configure the agent – Instructions t...

Zabbix alert Notification with Telegram

Zabbix Notifications with graphs in Telegram. Features  Graphs based on latest data are sent directly to your messenger  You can send messages both in private and group chats  Channels support  Saves chatid as a temporary file  Simple markdown and HTML are supported  Emoji in messages First of all : Nedd to install python (>3) on Cent os  # yum -y install python-pip # yum install -y https://centos7.iuscommunity.org/ius-release.rpm #  yum install -y python34u python34u-libs python34u-devel python34u-pi # yum -y install python-pip You need to install the  requests  module for python, this is required for operation! # pip install requests Put  zbxtg.py  in your  AlertScriptsPath  directory, the path is set inside your zabbix_server.conf (once confirm by zabbix server conf file ) Link to download ZBXTG.PY file  https://drive.google.com/open?i...