Search code examples
mysqldockerzabbix

How to monitor MySQL by Zabbix (in docker containers)?


I have:

  1. Zabbix server (computer A)
  2. Zabbix agent (computer B)
  3. Mysql (computer B)

But all of this components work inside Docker containers. How could I monitor Mysql by Zabbix in this case?

I saw this page (https://www.zabbix.com/integrations/mysql). But i think, this won't work in my case.


Solution

  • You can definitely use "Template DB MySQL by Zabbix agent":

    • if the Zabbix Agent is not dockerized:
      • and the MySQL port is published/mapped:
      • else:
        • map the port, and follow instructions.
    • else:
      • check that mysql client is present in the docker image, add it if missing
      • link that container to the MySQL container, and follow instructions.