docs(metrics-addr): Use port 9323, allocated for Docker in prometheus

Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
(cherry picked from commit 89aa2cf9f6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Frederic Hemberger 2018-12-21 09:04:21 +01:00 committed by Sebastiaan van Stijn
parent ce12ac2d14
commit 789a15bc73
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 7 additions and 3 deletions

View File

@ -1231,10 +1231,14 @@ The `--metrics-addr` option takes a tcp address to serve the metrics API.
This feature is still experimental, therefore, the daemon must be running in experimental
mode for this feature to work.
To serve the metrics API on localhost:1337 you would specify `--metrics-addr 127.0.0.1:1337`
allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the
To serve the metrics API on `localhost:9323` you would specify `--metrics-addr 127.0.0.1:9323`,
allowing you to make requests on the API at `127.0.0.1:9323/metrics` to receive metrics in the
[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format.
Port `9323` is the [default port associated with Docker
metrics](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)
to avoid collisions with other prometheus exporters and services.
If you are running a prometheus server you can add this address to your scrape configs
to have prometheus collect metrics on Docker. For more information
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/).
scrape_configs:
- job_name: 'docker'
static_configs:
- targets: ['127.0.0.1:1337']
- targets: ['127.0.0.1:9323']
```
Please note that this feature is still marked as experimental as metrics and metric