services: host: image: telegraf:1.18 restart: unless-stopped environment: - HOST_MOUNT_PREFIX=/hostfs - HOST_PROC=/hostfs/proc - HOST_SYS=/hostfs/sys - HOST_ETC=/hostfs/etc - HOST_VAR=/hostfs/var - HOST_RUN=/hostfs/run volumes: - ./telegraf_host.conf:/etc/telegraf/telegraf.conf:ro - /var/run/utmp:/var/run/utmp:ro - /:/hostfs:ro network_mode: "host" labels: - "docker.group=telegraf" net: image: telegraf:1.18 restart: unless-stopped volumes: - ./telegraf_net.conf:/etc/telegraf/telegraf.conf:ro networks: - dockersocket labels: - "docker.group=telegraf" dns: - ${LOCAL_DNS_SERVER} environment: - "HOST_NAME=${HOST_NAME}" networks: dockersocket: external: true