====== Zabbix - Template - Docker ======
===== Configure =====
Download and import the official [[https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/docker?at=release/6.2|Docker Template]].
Make sure, zabbix_agent2 is installed on the server. Add the zabbix user to the docker group and restart the service.
usermod -aG docker zabbix
systemctl restart zabbix-agent2.service
===== Problems =====
==== Cannot fetch data ====
root@dockerhost:~# sudo -u zabbix zabbix_agent2 -t docker.info
docker.info [m|ZBX_NOTSUPPORTED] [Cannot fetch data: Get "http://1.28/info": dial unix /run/containerd/containerd.sock: connect: permission denied.]
The zabbix user isn't allowed to access /run/containerd/containerd.sock. This can happen, if the user zabbix is not part of the group docker. To fix it:
usermod -aG docker zabbix