After we have installed Zabbix Server 4.x on Ubuntu 18.04 LTS. In this article will demonstrate how to install
Step 1 – Add Required Repository
Before installing Zabbix Agent 4.x first we should add the Zabbix apt repository:
For Debian 9:
# wget http://repo.zabbix.com/zabbix/4.1/debian/pool/main/z/zabbix-release/zabbix-release_4.1-1%2Bstretch_all.deb # dpkg -i zabbix-release_4.1-1+stretch_all.deb
For Debian 8:
# wget http://repo.zabbix.com/zabbix/4.1/debian/pool/main/z/zabbix-release/zabbix-release_4.1-1%2Bjessie_all.deb # zabbix-release_4.1-1+jessie_all.deb
Step 2 – Install Zabbix Agent
# apt-get update # apt-get install zabbix-agent -y
Step 3 – Edit Zabbix Agent Configuration
After Zabbix Agent has been successfully installed, we need to add the IP of the Zabbix monitoring server in the Zabbix Agent configuration file /etc/zabbix/zabbix_agentd.conf
# vi /etc/zabbix/zabbix_agentd.conf ### Option: Server # List of comma delimited IP addresses (or hostnames) of Zabbix servers. # Incoming connections will be accepted only from the hosts listed here. # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. # # Mandatory: no # Default: # Server= Server=192.168.1.201 # Add here the IP of your Zabbix Server # ### Option: ServerActive # ServerActive= # ServerActive=192.168.1.201 # Add here the IP of your Zabbix Server # Hostname=web01.yallalabs.com #Add here the Hostname of your server
Step 4 – Enable/Start Zabbix Agent
# Systemctl enable zabbix-agent # Systemctl start zabbix-agent
Step 5 – configure the host in Zabbix frontend
To add the remote host server in Zabbix frontend, do the following steps:
-1 Go to: Configuration -> Hosts
-2 Click on Create host to the right
-3 Fill the following paramaters of remote host server
*Enter Hostname: Hostname of Remote system
*Visible name: Name to be display in zabbix
*Group: Select the desired group for your host
*Agent interface: Ip of your host
-4 Go to Templates tab and select the desired Template for your host
-5 Click on add
We hope this tutorial was enough Helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!
3 comments
Hello
How can I add zabbix agent on the remote host using the public IP address ?
Is it possible to do that, I have 2 servers off site and would like to add it to zabbix server.
Thanks
Hi Samual,
The best practice is to use zabbix proxy on the remote site. Your zabbix proxy will collect the data from the clients and send it to the zabbix server. Like that you avoid a problem with firewall and Nat ecc …
Not work on Debian 8 due to package dependencies. Zabbix 4.0 zabbix-agent require libss1.1. But Debian 8 support up to libssl1.0.1 only.