To monitor my home network I use a zabbix proxy. To ensure it stays online, I’ve set it up redundantly. The ‘master’ runs on a VM in the hyper-V failover cluster. The backup runs on a raspberry pi. The reason the raspberry pi is the backup instead of the master is to keep the SD card from dying too quickly.
In this setup, I used the following info:
home-ZABP01 (VM) – 192.168.1.200
home-ZABP02 (rpi) – 192.168.1.201
VRRP – 192.168.1.202
Proxy side
network config
To make the setup redundant, I used VRRP via keepalived.
Allow the OS to reply on the VRRP address
Add the following line to /etc/sysctl.conf:
net.ipv4.ip_nonlocal_bind=1
Activate the new entry
sysctl -p
Install keepalived
Installing keepalived is pretty straightforward:
apt install keepalived
configure keepalived
On the Master node, create the config file with the following config
/etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 42
priority 100
authentication {
auth_type AH
auth_pass Up-cyQ4fd+M6m!LMNTD
}
virtual_ipaddress {
192.168.1.202
}
}
Do the same on the backup, but keep a few things in mind:
– the virtual_router_id must be the same on the master and backup
– give the backup a lower priority
– make sure the auth_pass is the same
– both nodes need the same virtual_ipaddress listed
restart the keepalived server to apply the config
systemctl restart keepalived.service
Zabbix proxy installation
Install the proxy as normal on the two nodes, as described in the zabbix docs: https://www.zabbix.com/documentation/4.4/manual/installation/install_from_packages/debian_ubuntu
Config
Configure the zabbix proxy as you would normally, with the exception of the following lines:
Hostname=home-ZPROXY
SourceIP=192.168.1.202
This will tell the zabbix proxy to use the shared VRRP ip address.
restart the zabbix proxy to apply
systemctl restart zabbix-proxy.service
Server side
Simply add only one proxy on the shared IP address, and make sure to use the configured hostname ‘home-ZPROXY’.
Agent side
Configure the agent to point to the shared IP address of the proxy.