docker build telegraf However, multiple configurations do not take effect
############ docker compose ################
telegraf:
image: telegraf:latest
container_name: telegraf
links:
- influxdb
volumes:
- /Users/apple/vdss_volume/telegraf/telegraf.d:/etc/telegraf/telegraf.d
- /Users/apple/vdss_volume/localtime:/etc/localtime:ro
- /Users/apple/vdss_volume/telegraf/logs:/var/log
deploy:
resources:
limits:
cpus: '0.20'
memory: 1024M
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "100m"
############################### telegraf log ###########################
2021-12-02T12:00:58Z E! [outputs.influxdb] When writing to [http://localhost:8086]: failed doing req: Post "http://localhost:8086/write?db=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
2021-12-02T12:00:58Z E! [agent] Error writing to outputs.influxdb: could not write any address
2021-12-02T12:01:08Z E! [outputs.influxdb] When writing to [http://localhost:8086]: failed doing req: Post "http://localhost:8086/write?db=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
2021-12-02T12:01:08Z E! [agent] Error writing to outputs.influxdb: could not write any address
2021-12-02T12:01:18Z E! [outputs.influxdb] When writing to [http://localhost:8086]: failed doing req: Post "http://localhost:8086/write?db=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
2021-12-02T12:01:18Z E! [agent] Error writing to outputs.influxdb: could not write any address
2021-12-02T12:01:28Z E! [outputs.influxdb] When writing to [http://localhost:8086]: failed doing req: Post "http://localhost:8086/write?db=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
2021-12-02T12:01:28Z E! [agent] Error writing to outputs.influxdb: could not write any address
2021-12-02T12:01:38Z E! [outputs.influxdb] When writing to [http://localhost:8086]: failed doing req: Post "http://localhost:8086/write?db=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
2021-12-02T12:01:38Z E! [agent] Error writing to outputs.influxdb: could not write any address
2021-12-02T12:01:48Z E! [outputs.influxdb] When writing to [http://localhost:8086]: failed doing req: Post "http://localhost:8086/write?db=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
2021-12-02T12:01:48Z E! [agent] Error writing to outputs.influxdb: could not write any address
################################################################################
Looks like the default configuration parameters???
However, there are mapping files in the container directory
![image|690x313](upload://8wERaOAQHzdp2RE4oN5T6lZjXII.jpeg)
![image|690x313](upload://8wERaOAQHzdp2RE4oN5T6lZjXII.jpeg)