Install Zabbix Agent on Ubuntu on Same Network as Zabbix Server
Video Lecture
Description
I install Zabbix Agent on an Ubuntu 20.04 on the same network as my Zabbix Server.
After organizing a new server, I then download and install the Zabbix repository on the server.
I re-visit the Zabbix download page at
https://www.zabbix.com/download
I have the Zabbix Packages tab active,
I then choose 6.0 LTS, Ubuntu and 20.04 Focal.
Also note that I am not installing the Zabbix server again, so it doesn't matter what selections I have for the database or web server.
Make sure you select the correct version for your operating system and architecture.
Also make sure that your agents are using the same version as your Zabbix server.
sudo wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
sudo dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
sudo apt update
After that, I then run
sudo apt install zabbix-agent
Now to configure the agent,
sudo nano /etc/zabbix/zabbix_agentd.conf
Edit parameters for Server
, ServerActive
, Hostname
and save.
After any changes to the configuration, you need to restart the agent.
sudo service zabbix-agent restart
Now to configure a new host using the Zabbix Server user interface.
Ensure you use the same host name that you set in the configuration file.
Add the template "Linux by Zabbix agent" which contains passive checks.
Add it to a group.
Finally, add an interface for "Agent" describing the IP address and port that Zabbix server will find the agent at and then save.
Troubleshooting Agent Configuration
Ensure your hostname in the Zabbix UI matches the Hostname in the agents' configuration file.
For passive checks, the Zabbix server (or Zabbix Proxy, if configured to use a proxy), should be able to ping the agent by the IP address or domain name you set up in the host configuration interface fields. Ping will respond if ICMP is enabled on the server that you are pinging, and if there is no network rule blocking it somewhere.
You can also telnet, from the Zabbix server (or Zabbix Proxy, if configured to use a proxy), to the port (default 10050), that the agent process is listening on.
For active checks, the server with the agent running, should be able to ping the IP address, or domain name you've set in the ServerActive
parameter in the agents' configuration file. This address will be the Zabbix Server, and/or the Zabbix Proxy. It should also be able to telnet to the Zabbix Server/Proxy port (default 10051)
To read the Zabbix Server logs, on the Zabbix Server type,
tail -f /var/log/zabbix/zabbix_server.log
To read the Zabbix Agent log files on the host,
tail -f /var/log/zabbix/zabbix_agentd.log