Merge pull request #1589 from fhemberger/patch-1

docs(metrics-addr): Use port 9323, allocated for Docker in prometheus
This commit is contained in:
Sebastiaan van Stijn 2018-12-21 23:53:59 +01:00 committed by GitHub
commit 0f33ff06d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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