Import Daemon Metrics from docker/docker for dockerd

This commit is contained in:
John Mulhausen 2017-01-25 10:54:39 -08:00
parent cc5a1416b3
commit 3bbdef8094
2 changed files with 30 additions and 1 deletions

View File

@ -985,6 +985,33 @@ long: |
option on `docker create` and `docker run`, and takes precedence over
the `--cgroup-parent` option on the daemon.
## Daemon Metrics
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
[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/)
format.
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/).
```yml
scrape_configs:
- job_name: 'docker'
static_configs:
- targets: ['127.0.0.1:1337']
```
Please note that this feature is still marked as experimental as metrics and
metric names could change while this feature is still in experimental. Please
provide feedback on what you would like to see collected in the API.
## Daemon configuration file
The `--config-file` option allows you to set any configuration option
@ -1327,6 +1354,8 @@ options:
- option: max-concurrent-uploads
default_value: 5
description: Set the max concurrent uploads for each push
- option: metrics-addr
description: Set address and port to serve the metrics api
- option: mtu
description: Set the containers network MTU
- option: oom-score-adjust

View File

@ -440,7 +440,7 @@ toc:
- path: /engine/reference/commandline/cli/
title: Use the Docker command line
- path: /engine/reference/commandline/dockerd/
title: Daemon CLI reference
title: Daemon CLI reference (dockerd)
- sectiontitle: Engine CLI reference
section:
- path: /engine/reference/commandline/docker/