janvda / balena-node-red-mqtt-nginx-TIG-stack

Composite docker application with "8" containers (2x Node-RED, 2x MQTT broker, Telegraf, InfluxDb, Grafana, Nginx) for deployment on Raspberry Pi through Balena.
Eclipse Public License 2.0
58 stars 42 forks source link

docker container dashboard shows the same container with different container_names #10

Closed janvda closed 5 years ago

janvda commented 5 years ago

The problem is that when a container becomes restarted it gets each a container_name (in fact the suffix of the container is different). FYI an example of the container_name of the influxdb container influxdb_643150_676670

This is a problem for the docker containers grafana dashboard as it is based on the container_name which means that it considers a restarted container or redeployed container as a new container.

One solution would be to assure that the container_name doesn't change during restarts, but I have tried using the container_name field in the docker compose yaml without success.

janvda commented 5 years ago

Fixed by 8bd2f26
So this fix has added a telegraf processor that will substitute every container_name which looks like influxdb_643150_676670 into influxdb