Hello everyone,
I’m using Zabbix to monitor my Docker containers, and overall, it works very well. I’ve set up discovery to track containers and monitor their metrics efficiently.
However, since I started using Docker Swarm, I’ve encountered a challenge. Each time the Docker containers are restarted (due to scaling, updates, or node changes), their names change. For example, a container might be named app_mycontainer.1.xxyz1234 initially, but after a restart, it could be renamed to something like app_mycontainer.1.abcd5678.
This behavior causes issues in Zabbix:
I’d like to know if anyone has experienced a similar issue and how you resolved it. Is there a way to handle this dynamically in Zabbix to avoid accumulating non-existent containers and to prevent unnecessary alerts when containers are replaced in Swarm mode?
Here are the specifics of my setup:
Thank you in advance for your help!
I’m using Zabbix to monitor my Docker containers, and overall, it works very well. I’ve set up discovery to track containers and monitor their metrics efficiently.
However, since I started using Docker Swarm, I’ve encountered a challenge. Each time the Docker containers are restarted (due to scaling, updates, or node changes), their names change. For example, a container might be named app_mycontainer.1.xxyz1234 initially, but after a restart, it could be renamed to something like app_mycontainer.1.abcd5678.
This behavior causes issues in Zabbix:
- Old container names remain in Zabbix with no metrics (because the containers no longer exist).
- New container names are treated as entirely new entities, triggering alerts for the "missing" containers.
I’d like to know if anyone has experienced a similar issue and how you resolved it. Is there a way to handle this dynamically in Zabbix to avoid accumulating non-existent containers and to prevent unnecessary alerts when containers are replaced in Swarm mode?
Here are the specifics of my setup:
- Zabbix Version: 6.4.16
- Docker Setup: Using Docker Swarm
- Monitoring Template: Docker by Zabbix Agent 2
- Problem: Container names change on restart due to Docker Swarm's naming convention.
Thank you in advance for your help!

Comment