version: '3'

services:

  telegraf:
    image: telegraf
    container_name: telegraf
    restart: always
    volumes:
      - ./telegraf:/etc/telegraf
      - /sys:/rootfs/sys:ro
      - /proc:/rootfs/proc:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - 'HOST_PROC=/rootfs/proc'
      - 'HOST_SYS=/rootfs/sys'
      - /etc/localtime:/etc/localtime:ro

