[agent]
interval = "10s"
[[outputs.influxdb]]
urls = ["http://influxdb:8086"]
skip_database_creation = true
database = "db0"
password = "admin"
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
Below is my full compose file to help reproducing:
version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.mqtt.address=:1883"
- "--entrypoints.http.address=:80"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
# Mosquitto
- "1883:1883"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- ./docker/treafik:/etc/traefik/
telegraf:
image: telegraf:1.15.2
command: telegraf -config /etc/telegraf/telegraf.toml
volumes:
- ./docker/telegraf:/etc/telegraf
- /var/run/docker.sock:/var/run/docker.sock
homeassistant:
image: homeassistant/home-assistant:stable
depends_on:
- influxdb
- mqtt
volumes:
- ./docker/homeassistant/config:/config
environment:
- TZ=Netherlands/Amsterdam
labels:
- "traefik.enable=true"
- traefik.http.routers.homeassistant.entrypoints=http
- traefik.http.routers.homeassistant.rule=Host(`homeassistant.local`,`homeassistant.localhost`)
- traefik.http.services.homeassistant.loadbalancer.server.port=8123
mqtt:
image: eclipse-mosquitto
volumes:
- ./docker/mqtt/config:/mosquitto/config:ro
labels:
- "traefik.enable=true"
- traefik.tcp.routers.mqtt.rule=HostSNI(`*`)
- traefik.tcp.routers.mqtt.entrypoints=mqtt
- traefik.tcp.services.mqtt.loadbalancer.server.port=1883
grafana:
image: grafana/grafana:7.1.5
depends_on:
- influxdb
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/provisioning/:/etc/grafana/provisioning:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/home.json
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
- GF_AUTH_ANONYMOUS_ORG_ROLE=Editor
- GF_USERS_ALLOW_SIGN_UP=false
labels:
- "traefik.enable=true"
- traefik.http.routers.grafana.entrypoints=http
- traefik.http.routers.grafana.rule=Host(`homedashboard.local`,`homedashboard.localhost`)
- traefik.http.services.grafana.loadbalancer.server.port=3000
influxdb:
image: influxdb:1.8.1
volumes:
- influxdb-data:/var/lib/influxdb
environment:
- INFLUXDB_DB=db0
- INFLUXDB_ADMIN_USER=${INFLUXDB_USERNAME}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_PASSWORD}
portainer:
image: portainer/portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
labels:
- "traefik.enable=true"
- traefik.http.routers.portainer.entrypoints=http
- "traefik.http.routers.portainer.rule=Host(`portainer.local`,`portainer.localhost`)"
- traefik.http.services.portainer.loadbalancer.server.port=9000
volumes:
grafana-data:
influxdb-data:
portainer_data:
Seeing the memory usage. Locally on my windows 10 machine this does work.
Memory usage is 0 bytes.
Cpu metrics seem to be fine. Its just the memory thats somehow being reported as 0.

Query for the panel above: SELECT mean("usage") FROM "docker_container_mem" WHERE $timeFilter GROUP BY time($__interval), "com.docker.compose.service" fill(null)
Memory control groups are disabled on raspberry pi. Add the following to your /boot/cmdline.txt to enable this metic:
cgroup_enable=memory cgroup_memory=1.
Most helpful comment
Memory control groups are disabled on raspberry pi. Add the following to your
/boot/cmdline.txtto enable this metic:cgroup_enable=memory cgroup_memory=1.See also: https://stackoverflow.com/questions/47520693/raspbian-docker-error-response-from-daemon-cgroups-memory-cgroup-not-supporte