===== Installationsprotokoll Zabbix Agent 2 und Docker-Monitoring =====
==== System aktualisieren ====
sudo apt-get update
sudo apt-get upgrade
==== Zabbix Agent 2 installieren ====
wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
sudo dpkg -i zabbix-release_latest+debian12_all.deb
sudo apt-get update
sudo apt-get install zabbix-agent2 zabbix-agent2-plugin-* zabbix-get
==== Zabbix Agent 2 starten und aktivieren ====
sudo systemctl enable zabbix-agent2
sudo systemctl restart zabbix-agent2
==== Benutzer zur Docker-Gruppe hinzufügen ====
sudo usermod -aG docker zabbix
==== Zabbix Agent 2 Konfiguration anpassen ====
sudo nano /etc/zabbix/zabbix_agent2.conf
Füge folgende Zeilen hinzu:
Plugins.Docker.Endpoint=unix:///var/run/docker.sock
Server=127.0.0.1,::1,172.30.1.170
ServerActive=127.0.0.1,::1,172.30.1.170
==== Zabbix Agent 2 neu starten ====
sudo systemctl restart zabbix-agent2
==== Docker testen ====
sudo docker run hello-world
==== Zabbix Docker-Monitoring testen ====
zabbix_get -s localhost -k docker.info
Beispielausgabe:
{"Id":"e948ac0f-92df-4fe8-bc3c-3de3b2b3a230", "Containers":5, "ContainersRunning":3, ...}