简体   繁体   中英

telegraf on windows - inputs.docker error in plugin cannot connect to the docker daemon

I have this configuration:

# Read metrics about docker containers

[[inputs.docker]]
  ## Docker Endpoint
  ##   To use TCP, set endpoint = "tcp://[ip]:[port]"
  ##   To use environment variables (ie, docker-machine), set endpoint = "ENV"
  endpoint = "unix:///var/run/docker.sock"

I get this error: "inputs.docker error in plugin cannot connect to the docker daemon" As I understand, that shouldn't work on Windows. I don't understand why the docs still don't explain how to use it on Windows. How do I set the endpoint correctly?

Just add this volume to the Telgraf container:

  • //var/run/docker.sock://var/run/docker.sock

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM