37 lines
844 B
YAML
37 lines
844 B
YAML
services:
|
|
|
|
host:
|
|
image: telegraf:${TELEGRAF_VERSION}
|
|
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:${TELEGRAF_VERSION}
|
|
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
|