Knowledge Base

Browse our knowledge base for free solutions to common problems

Enable Docker Monitoring Inside Zabbix

Created On: 20 September 2022
Written by: Ben

On the agent

Make the Zabbix library directory:

mkdir /usr/local/lib/zabbix/

Make the Zabbix agent directory under the Zabbix:

mkdir /usr/local/lib/zabbix/agent/

Move to the created agent directory:

cd /usr/local/lib/zabbix/agent/

Download compiled module for your specific Linux distro (I am using CentOS 7):

wget https://github.com/monitoringartist/zabbix-docker-monitoring/raw/gh-pages/centos7/3.4/zabbix_module_docker.so

Ensure you download the correct (.so) file for your Linux distro and agent version. You can find the correct version for your distro here:

https://github.com/monitoringartist/zabbix-docker-monitoring#installation

If they don't work your only option is to manually compile the .so file:

https://github.com/monitoringartist/zabbix-docker-monitoring#compilation

You can get the agent version by running: "$(which zabbix_agentd) -V"

Add the Zabbix user to the Docker group so the agent can access the required monitoring data:

usermod -aG docker zabbix

Add the created module directory to the Zabbix config and load the module:

nano /etc/zabbix/zabbix_agentd.conf

Add the following lines to the file:

LoadModulePath=/usr/local/lib/zabbix/agent/
LoadModule=zabbix_module_docker.so

 

ICTU LTD is a company registered England and Wales (Company No. 09344913) 15 Queen Square, Leeds, West Yorkshire, England, LS2 8AJ
Copyright © 2024 ICTU LTD, All Rights Reserved.
exit