github.com/netdata/go.d.plugin@v0.58.1/modules/docker_engine/integrations/docker_engine.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/docker_engine/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/docker_engine/metadata.yaml" 4 sidebar_label: "Docker Engine" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/Containers and VMs" 7 most_popular: False 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # Docker Engine 12 13 14 <img src="https://netdata.cloud/img/docker.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: docker_engine 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors the activity and health of Docker Engine and Docker Swarm. 25 26 27 The [built-in](https://docs.docker.com/config/daemon/prometheus/) Prometheus exporter is used to get the metrics. 28 29 30 This collector is supported on all platforms. 31 32 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 33 34 35 ### Default Behavior 36 37 #### Auto-Detection 38 39 It discovers instances running on localhost by attempting to connect to a known Docker TCP socket: `http://127.0.0.1:9323/metrics`. 40 41 42 #### Limits 43 44 The default configuration for this integration does not impose any limits on data collection. 45 46 #### Performance Impact 47 48 The default configuration for this integration is not expected to impose a significant performance impact on the system. 49 50 51 ## Metrics 52 53 Metrics grouped by *scope*. 54 55 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 56 57 58 59 ### Per Docker Engine instance 60 61 These metrics refer to the entire monitored application. 62 63 This scope has no labels. 64 65 Metrics: 66 67 | Metric | Dimensions | Unit | 68 |:------|:----------|:----| 69 | docker_engine.engine_daemon_container_actions | changes, commit, create, delete, start | actions/s | 70 | docker_engine.engine_daemon_container_states_containers | running, paused, stopped | containers | 71 | docker_engine.builder_builds_failed_total | build_canceled, build_target_not_reachable_error, command_not_supported_error, dockerfile_empty_error, dockerfile_syntax_error, error_processing_commands_error, missing_onbuild_arguments_error, unknown_instruction_error | fails/s | 72 | docker_engine.engine_daemon_health_checks_failed_total | fails | events/s | 73 | docker_engine.swarm_manager_leader | is_leader | bool | 74 | docker_engine.swarm_manager_object_store | nodes, services, tasks, networks, secrets, configs | objects | 75 | docker_engine.swarm_manager_nodes_per_state | ready, down, unknown, disconnected | nodes | 76 | docker_engine.swarm_manager_tasks_per_state | running, failed, ready, rejected, starting, shutdown, new, orphaned, preparing, pending, complete, remove, accepted, assigned | tasks | 77 78 79 80 ## Alerts 81 82 There are no alerts configured by default for this integration. 83 84 85 ## Setup 86 87 ### Prerequisites 88 89 #### Enable built-in Prometheus exporter 90 91 To enable built-in Prometheus exporter, follow the [official documentation](https://docs.docker.com/config/daemon/prometheus/#configure-docker). 92 93 94 95 ### Configuration 96 97 #### File 98 99 The configuration file name for this integration is `go.d/docker_engine.conf`. 100 101 102 You can edit the configuration file using the `edit-config` script from the 103 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 104 105 ```bash 106 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 107 sudo ./edit-config go.d/docker_engine.conf 108 ``` 109 #### Options 110 111 The following options can be defined globally: update_every, autodetection_retry. 112 113 114 <details><summary>Config options</summary> 115 116 | Name | Description | Default | Required | 117 |:----|:-----------|:-------|:--------:| 118 | update_every | Data collection frequency. | 1 | no | 119 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 120 | url | Server URL. | http://127.0.0.1:9323/metrics | yes | 121 | username | Username for basic HTTP authentication. | | no | 122 | password | Password for basic HTTP authentication. | | no | 123 | proxy_url | Proxy URL. | | no | 124 | proxy_username | Username for proxy basic HTTP authentication. | | no | 125 | proxy_password | Password for proxy basic HTTP authentication. | | no | 126 | timeout | HTTP request timeout. | 1 | no | 127 | method | HTTP request method. | GET | no | 128 | body | HTTP request body. | | no | 129 | headers | HTTP request headers. | | no | 130 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 131 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 132 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 133 | tls_cert | Client TLS certificate. | | no | 134 | tls_key | Client TLS key. | | no | 135 136 </details> 137 138 #### Examples 139 140 ##### Basic 141 142 A basic example configuration. 143 144 ```yaml 145 jobs: 146 - name: local 147 url: http://127.0.0.1:9323/metrics 148 149 ``` 150 ##### HTTP authentication 151 152 Basic HTTP authentication. 153 154 <details><summary>Config</summary> 155 156 ```yaml 157 jobs: 158 - name: local 159 url: http://127.0.0.1:9323/metrics 160 username: username 161 password: password 162 163 ``` 164 </details> 165 166 ##### HTTPS with self-signed certificate 167 168 Configuration with enabled HTTPS and self-signed certificate. 169 170 <details><summary>Config</summary> 171 172 ```yaml 173 jobs: 174 - name: local 175 url: http://127.0.0.1:9323/metrics 176 tls_skip_verify: yes 177 178 ``` 179 </details> 180 181 ##### Multi-instance 182 183 > **Note**: When you define multiple jobs, their names must be unique. 184 185 Collecting metrics from local and remote instances. 186 187 188 <details><summary>Config</summary> 189 190 ```yaml 191 jobs: 192 - name: local 193 url: http://127.0.0.1:9323/metrics 194 195 - name: remote 196 url: http://192.0.2.1:9323/metrics 197 198 ``` 199 </details> 200 201 202 203 ## Troubleshooting 204 205 ### Debug Mode 206 207 To troubleshoot issues with the `docker_engine` collector, run the `go.d.plugin` with the debug option enabled. The output 208 should give you clues as to why the collector isn't working. 209 210 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 211 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 212 213 ```bash 214 cd /usr/libexec/netdata/plugins.d/ 215 ``` 216 217 - Switch to the `netdata` user. 218 219 ```bash 220 sudo -u netdata -s 221 ``` 222 223 - Run the `go.d.plugin` to debug the collector: 224 225 ```bash 226 ./go.d.plugin -d -m docker_engine 227 ``` 228 229