How to specify Docker host on Windows?


I'm trying out Metricbeat, and attempting to get some data from the Docker module. I've got the thing configured (just the bare minimum so far, with the "container" metricset), and I've run into some difficulty in specifying the host. Currently, my config looks like this:

- module: docker
    - container
  hosts: ["npipe://./pipe/docker_engine"]
  enabled: true
  period: 30s

While this configuration passes -configtest (several other attempts didn't), it doesn't actually work. The error message I get is this:

Get http://unix.sock/containers/json?: open /pipe/docker_engine: The system cannot find the path specified.

This error message doesn't give me a lot of confidence that Metricbeat is attempting to connect to Docker correctly. Is there some other way I should be specifying the host?

(Carlos Pérez Aradros) #2

Hi @godefroi,

I'm not very familiar with Windows npipe for docker, but could you try npipe:////./pipe/docker_engine as the host?

If that doesn't work, you can try to switch to HTTP connection to the docker daemon


With the host set to npipe:////./pipe/docker_engine I get:

PS C:\Program Files\Metricbeat> .\metricbeat.exe -configtest
Exiting: 1 error: host parsing failed for docker-container: error parsing URL: empty host

While I likely can switch to HTTP for the Docker daemon, I would really rather not, as the host as you gave it works in other tools, such as Registrator, for example.

(Carlos Pérez Aradros) #4

I would say this looks like a bug, in theory that URL should work, so maybe validations are breaking windows compatibility.

Feel free to open a new bug report at github:


Thanks. I did just that:

(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.