# How to specify Docker host on Windows?

**URL:** <https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 21, 2017, 7:42pm UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153 "2017-07-21T19:42:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![godefroi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@godefroi](https://discuss.elastic.co/u/godefroi)\
**Post date:** [July 21, 2017, 7:42pm UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153/1 "2017-07-21T19:42:48Z")

</div>

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
  metricsets:
    - 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?

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [July 24, 2017, 9:03am UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153/2 "2017-07-24T09:03:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![godefroi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@godefroi](https://discuss.elastic.co/u/godefroi)\
**Post date:** [July 24, 2017, 12:16pm UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153/3 "2017-07-24T12:16:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [July 25, 2017, 2:14pm UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153/4 "2017-07-25T14:14:09Z")

</div>

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: [https://github.com/elastic/beats/issues](https://github.com/elastic/beats/issues)

---

<div class="post-metadata">

**Author:** ![godefroi](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@godefroi](https://discuss.elastic.co/u/godefroi)\
**Post date:** [July 25, 2017, 2:38pm UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153/5 "2017-07-25T14:38:35Z")

</div>

Thanks. I did just that: [https://github.com/elastic/beats/issues/4748](https://github.com/elastic/beats/issues/4748)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 22, 2017, 2:38pm UTC](https://discuss.elastic.co/t/how-to-specify-docker-host-on-windows/94153/6 "2017-08-22T14:38:48Z")

</div>

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