Skip to content

Commit 0f33ff0

Browse files
authored
Merge pull request docker#1589 from fhemberger/patch-1
docs(metrics-addr): Use port 9323, allocated for Docker in prometheus
2 parents 6deb4f1 + 89aa2cf commit 0f33ff0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/reference/commandline/dockerd.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,10 +1231,14 @@ The `--metrics-addr` option takes a tcp address to serve the metrics API.
12311231
This feature is still experimental, therefore, the daemon must be running in experimental
12321232
mode for this feature to work.
12331233

1234-
To serve the metrics API on localhost:1337 you would specify `--metrics-addr 127.0.0.1:1337`
1235-
allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the
1234+
To serve the metrics API on `localhost:9323` you would specify `--metrics-addr 127.0.0.1:9323`,
1235+
allowing you to make requests on the API at `127.0.0.1:9323/metrics` to receive metrics in the
12361236
[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format.
12371237

1238+
Port `9323` is the [default port associated with Docker
1239+
metrics](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)
1240+
to avoid collisions with other prometheus exporters and services.
1241+
12381242
If you are running a prometheus server you can add this address to your scrape configs
12391243
to have prometheus collect metrics on Docker. For more information
12401244
on prometheus you can view the website [here](https://prometheus.io/).
@@ -1243,7 +1247,7 @@ on prometheus you can view the website [here](https://prometheus.io/).
12431247
scrape_configs:
12441248
- job_name: 'docker'
12451249
static_configs:
1246-
- targets: ['127.0.0.1:1337']
1250+
- targets: ['127.0.0.1:9323']
12471251
```
12481252

12491253
Please note that this feature is still marked as experimental as metrics and metric

0 commit comments

Comments
 (0)