Skip to content

metrics-addr should be 0.0.0.0:9323 for a dockerized prometheus to reach it #21632

@Sleavely

Description

@Sleavely

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

The documentation states you should configure /etc/docker/daemon.json to listen on the loopback interface as such:

{
  "metrics-addr": "127.0.0.1:9323"
}

but then states Prometheus can be run in a container, which would resolve host.docker.internal to an address on Dockers network, something like 172.17.0.1. Even though the address leads to the same host as the daemon, there is nothing listening to port 9323 for that specific address.

Location

https://docs.docker.com/engine/daemon/prometheus/

Suggestion

To make the guide applicable to a larger majority, the suggested configuration should instead be:

{
  "metrics-addr": "0.0.0.0:9323"
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions