Install Zabbix Agent Ubuntu
Ubuntu 22.04
wget [Link]
2+ubuntu22.04_all.deb
dpkg -i zabbix-release_5.0-2+ubuntu22.04_all.deb
apt-get update
apt-get install zabbix-agent
Ubuntu 20.04
wget [Link]
1%2Bfocal_all.deb
dpkg -i zabbix-release_5.0-1+focal_all.deb
apt-get update
apt-get install zabbix-agent
Ubuntu 18.04
wget [Link]
1%2Bbionic_all.deb
dpkg -i zabbix-release_5.0-1+bionic_all.deb
sudo apt update
apt-get install zabbix-agent
Configure Zabbix Agent for Passive
Checks
Edit the zabbix configuration file:
sudo vi /etc/zabbix/zabbix_agentd.conf
Set the following parameter according to your environment:
Server=[Link]
save the file and close
Restart and enable zabbix agent service
sudo systemctl restart zabbix-agent
sudo systemctl enable zabbix-agent
Start/stop/check status of zabbix agent service:
sudo systemctl start zabbix-agent
sudo systemctl stop zabbix-agent
sudo systemctl status zabbix-agent
Configure Zabbix Agent for Active Checks
Edit the zabbix configuration file:
sudo vi /etc/zabbix/zabbix_agentd.conf
Set the following parameters according to your environment:
ServerActive=[Link]
Hostname=[Link]
save the file and close
Restart and enable zabbix agent service
sudo systemctl restart zabbix-agent
sudo systemctl enable zabbix-agent
Start/stop/check status of zabbix agent service:
sudo systemctl start zabbix-agent
sudo systemctl stop zabbix-agent
sudo systemctl status zabbix-agent
Configure TLS with PSK
Edit the zabbix configuration file:
sudo nano /etc/zabbix/zabbix_agentd.conf
Set the following parameters where unique_psk_identity is some unique value for the agent you
are configuring. I can be anything as long as it's unique for this host:
TLSConnect=psk
TLSAccept=psk
TLSPSKIdentity=unique_psk_identity
TLSPSKFile=/etc/zabbix/zabbix_agentd.psk
save the file and close
Run the following command to generate a psk file using the path and name specified in the
TLSPSKFile parameter from above:
openssl rand -hex 32 | sudo tee /etc/zabbix/zabbix_agentd.psk
Note the generated random string as you will need it to configure the agent on the Zabbix server
under the Configuration --> Hosts --> Host -->Encryption tab.
Start/stop/check status of zabbix agent service:
sudo systemctl start zabbix-agent
sudo systemctl stop zabbix-agent
sudo systemctl status zabbix-agent
Révision #11
Créé 17 November 2020 [Link] par Dino Edwards
Mis à jour 31 July 2022 [Link] par Dino Edwards