Installation of Zabbix Agent on Linux

Throughout my Zabbix journey, I have been on to enable enhanced network, server and device monitoring I have installed the Zabbix Agent onto many devices. Linux was by a long shot the hardest for me to get running smoothly, even after device reboots. Below are the instructions that will enable the installation of the Zabbix Agent on a Linux device, including allowing it through a firewall and starting up on boot as a service.

Adding Zabbix Package to Raspbian OS

dpkg -i zabbix-release_4.2-2+buster_all.deb
apt update

Adding Zabbix Package to Debian/Ubuntu OS

dpkg -i zabbix-release_4.2-2+buster_all.deb
apt update

Installation on Zabbix Agent on either OS

apt install zabbix-agent
nano /etc/zabbix/zabbix_agentd.conf

You can then change the values of the Zabbix Agent Configuration File. Common changes I make are to; Remote Commands, Server and ServerActive.

Installation of Zabbix as a service and restarting the service

systemctl enable zabbix-agent
systemctl start zabbix-agent

Add exceptions to the IPTables Firewall (if installed)

The first command will show you a list of current rules so that you can install customise the following commands if required for your device.

iptables -S
iptables -I INPUT 5 -p tcp -m tcp --dport 10050 -J ACCEPT
-A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT

Restart the IPTables and Networking Services to apply the changes

/etc/init.d/network restart

Thanks for reading and until next time Happy Learning!