Add metrics docs to cli reference
| ... | ... |
@@ -68,6 +68,7 @@ Options: |
| 68 | 68 |
--log-opt value Default log driver options for containers (default map[]) |
| 69 | 69 |
--max-concurrent-downloads int Set the max concurrent downloads for each pull (default 3) |
| 70 | 70 |
--max-concurrent-uploads int Set the max concurrent uploads for each push (default 5) |
| 71 |
+ --metrics-addr string Set address and port to serve the metrics api (default "") |
|
| 71 | 72 |
--mtu int Set the containers network MTU |
| 72 | 73 |
--oom-score-adjust int Set the oom_score_adj for the daemon (default -500) |
| 73 | 74 |
-p, --pidfile string Path to use for daemon PID file (default "/var/run/docker.pid") |
| ... | ... |
@@ -1089,6 +1090,31 @@ This setting can also be set per container, using the `--cgroup-parent` |
| 1089 | 1089 |
option on `docker create` and `docker run`, and takes precedence over |
| 1090 | 1090 |
the `--cgroup-parent` option on the daemon. |
| 1091 | 1091 |
|
| 1092 |
+## Daemon Metrics |
|
| 1093 |
+ |
|
| 1094 |
+The `--metrics-addr` option takes a tcp address to serve the metrics API. |
|
| 1095 |
+This feature is still experimental, therefore, the daemon must be running in experimental |
|
| 1096 |
+mode for this feature to work. |
|
| 1097 |
+ |
|
| 1098 |
+To serve the metrics API on localhost:1337 you would specify `--metrics-addr 127.0.0.1:1337` |
|
| 1099 |
+allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the |
|
| 1100 |
+[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format. |
|
| 1101 |
+ |
|
| 1102 |
+If you are running a prometheus server you can add this address to your scrape configs |
|
| 1103 |
+to have prometheus collect metrics on Docker. For more information |
|
| 1104 |
+on prometheus you can view the website [here](https://prometheus.io/). |
|
| 1105 |
+ |
|
| 1106 |
+```yml |
|
| 1107 |
+scrape_configs: |
|
| 1108 |
+ - job_name: 'docker' |
|
| 1109 |
+ static_configs: |
|
| 1110 |
+ - targets: ['127.0.0.1:1337'] |
|
| 1111 |
+``` |
|
| 1112 |
+ |
|
| 1113 |
+Please note that this feature is still marked as experimental as metrics and metric |
|
| 1114 |
+names could change while this feature is still in experimental. Please provide |
|
| 1115 |
+feedback on what you would like to see collected in the API. |
|
| 1116 |
+ |
|
| 1092 | 1117 |
## Daemon configuration file |
| 1093 | 1118 |
|
| 1094 | 1119 |
The `--config-file` option allows you to set any configuration option |