master
yaml 277 lines 11.1 KB
Raw
1 plugin_name: go.d.plugin
2 modules:
3 - meta:
4 id: collector-go.d.plugin-docker
5 plugin_name: go.d.plugin
6 module_name: docker
7 alternative_monitored_instances: []
8 monitored_instance:
9 name: Docker
10 link: https://www.docker.com/
11 categories:
12 - data-collection.containers-and-vms
13 icon_filename: docker.svg
14 related_resources:
15 integrations:
16 list: []
17 info_provided_to_referring_integrations:
18 description: ""
19 keywords:
20 - container
21 overview:
22 data_collection:
23 metrics_description: |
24 This collector monitors Docker containers state, health status and more.
25 method_description: |
26 It connects to the Docker instance via a TCP or UNIX socket and executes the following commands:
27
28 - [System info](https://docs.docker.com/engine/api/v1.43/#tag/System/operation/SystemInfo).
29 - [List images](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageList).
30 - [List containers](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerList).
31 supported_platforms:
32 include: []
33 exclude: []
34 multi_instance: true
35 additional_permissions:
36 description: Requires netdata user to be in the docker group.
37 default_behavior:
38 auto_detection:
39 description: |
40 It discovers instances running on localhost by attempting to connect to a known Docker UNIX socket: `/var/run/docker.sock`.
41 limits:
42 description: ""
43 performance_impact:
44 description: |
45 Enabling `collect_container_size` may result in high CPU usage depending on the version of Docker Engine.
46 setup:
47 prerequisites:
48 list: []
49 configuration:
50 file:
51 name: go.d/docker.conf
52 options:
53 description: |
54 The following options can be defined globally: update_every, autodetection_retry.
55 folding:
56 title: Config options
57 enabled: true
58 list:
59 - name: update_every
60 description: Data collection interval (seconds).
61 default_value: 1
62 required: false
63 group: Collection
64 - name: autodetection_retry
65 description: Autodetection retry interval (seconds). Set 0 to disable.
66 default_value: 0
67 required: false
68 group: Collection
69
70 - name: address
71 description: "Docker daemon address. For TCP sockets: `tcp://IP:PORT`."
72 default_value: unix:///var/run/docker.sock
73 required: true
74 group: Target
75 - name: timeout
76 description: Request timeout (seconds).
77 default_value: 2
78 required: false
79 group: Target
80
81 - name: container_selector
82 description: "Container selector. Defines which containers to monitor. Uses [simple patterns](https://github.com/netdata/netdata/tree/master/src/libnetdata/simple_pattern#readme)."
83 default_value: "*"
84 required: false
85 group: Filters
86
87 - name: collect_container_size
88 description: Collect container writable layer size metrics.
89 default_value: no
90 required: false
91 group: Metrics Selection
92
93 - name: vnode
94 description: Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes).
95 default_value: ""
96 required: false
97 group: Virtual Node
98 examples:
99 folding:
100 enabled: true
101 title: Config
102 list:
103 - name: Basic
104 description: An example configuration.
105 folding:
106 enabled: false
107 config: |
108 jobs:
109 - name: local
110 address: 'unix:///var/run/docker.sock'
111 - name: Multi-instance
112 description: |
113 > **Note**: When you define multiple jobs, their names must be unique.
114
115 Collecting metrics from local and remote instances.
116 config: |
117 jobs:
118 - name: local
119 address: 'unix:///var/run/docker.sock'
120
121 - name: remote
122 address: 'tcp://203.0.113.10:2375'
123 troubleshooting:
124 problems:
125 list: []
126 alerts:
127 - name: docker_container_unhealthy
128 metric: docker.container_health_status
129 info: ${label:container_name} docker container health status is unhealthy
130 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/docker.conf
131 functions:
132 description: |
133 This collector exposes real-time functions for interactive troubleshooting in the Live tab.
134 list:
135 - id: container-ls
136 name: Containers
137 description: |
138 Retrieves container list data equivalent to `docker ps -a`.
139
140 This function calls the Docker Container List API with `all=true` and returns both running and non-running containers in a table similar to Docker CLI output.
141
142 Use cases:
143 - Quickly inspect all containers (running, exited, paused, dead) from Netdata
144 - Correlate container lifecycle with metric changes and alerts
145 - Verify exposed ports, image tags, and container names without shell access
146 parameters: []
147 returns:
148 description: Container inventory from Docker Engine. Each row represents one container returned by `docker ps -a`.
149 columns:
150 - name: CONTAINER ID
151 type: string
152 unit: ""
153 description: Short container ID (12 characters).
154 - name: IMAGE
155 type: string
156 unit: ""
157 description: Container image reference.
158 - name: COMMAND
159 type: string
160 unit: ""
161 description: Container command as reported by Docker API.
162 - name: CREATED
163 type: string
164 unit: ""
165 description: Human-readable container creation age (for example, '5 days ago').
166 - name: STATUS
167 type: string
168 unit: ""
169 description: Docker status string (for example, 'Up 3 weeks' or 'Exited (0) 4 weeks ago').
170 - name: State (Raw)
171 type: string
172 unit: ""
173 visibility: hidden
174 description: Raw Docker state value (for example, running, exited, paused, restarting, dead).
175 - name: PORTS
176 type: string
177 unit: ""
178 description: Published or exposed ports summary.
179 - name: NAMES
180 type: string
181 unit: ""
182 description: Container name.
183 - name: Container ID (Full)
184 type: string
185 unit: ""
186 visibility: hidden
187 description: Full 64-character container ID.
188 - name: Created (Unix)
189 type: integer
190 unit: "seconds"
191 visibility: hidden
192 description: Container creation timestamp in Unix seconds.
193 performance: |
194 Executes a single Docker API request (`ContainerList` with `all=true`):<br/>• No per-container inspect requests are issued<br/>• Response size grows with total container count<br/>• Large histories with many stopped containers may return more rows
195 security: |
196 Exposes container metadata that may include sensitive details:<br/>• Container command text may include runtime arguments<br/>• Image names, ports, and container names are visible<br/>• Restrict access to authorized operators
197 availability: |
198 Available when:<br/>• Docker collector is initialized and connected<br/>• Docker API list-containers request succeeds<br/>• Returns HTTP 503 while collector is initializing<br/>• Returns HTTP 500 on Docker API errors<br/>• Returns HTTP 504 on timeout
199 require_cloud: true
200 metrics:
201 folding:
202 title: Metrics
203 enabled: false
204 description: ""
205 availability: []
206 scopes:
207 - name: global
208 description: These metrics refer to the entire monitored application.
209 labels: []
210 metrics:
211 - name: docker.containers_state
212 description: Total number of Docker containers in various states
213 unit: containers
214 chart_type: stacked
215 dimensions:
216 - name: running
217 - name: paused
218 - name: stopped
219 - name: docker.containers_health_status
220 description: Total number of Docker containers in various health states
221 unit: containers
222 chart_type: line
223 dimensions:
224 - name: healthy
225 - name: unhealthy
226 - name: not_running_unhealthy
227 - name: starting
228 - name: no_healthcheck
229 - name: docker.images
230 description: Total number of Docker images in various states
231 unit: images
232 chart_type: stacked
233 dimensions:
234 - name: active
235 - name: dangling
236 - name: docker.images_size
237 description: Total size of all Docker images
238 unit: bytes
239 chart_type: line
240 dimensions:
241 - name: size
242 - name: container
243 description: Metrics related to containers. Each container provides its own set of the following metrics.
244 labels:
245 - name: container_name
246 description: The container's name
247 - name: image
248 description: The image name the container uses
249 metrics:
250 - name: docker.container_state
251 description: Docker container state
252 unit: state
253 chart_type: line
254 dimensions:
255 - name: running
256 - name: paused
257 - name: exited
258 - name: created
259 - name: restarting
260 - name: removing
261 - name: dead
262 - name: docker.container_health_status
263 description: Docker container health status
264 unit: status
265 chart_type: line
266 dimensions:
267 - name: healthy
268 - name: unhealthy
269 - name: not_running_unhealthy
270 - name: starting
271 - name: no_healthcheck
272 - name: docker.container_writeable_layer_size
273 description: Docker container writable layer size
274 unit: size
275 chart_type: line
276 dimensions:
277 - name: writeable_layer