master
yaml 630 lines 25.6 KB
Raw
1 plugin_name: go.d.plugin
2 modules:
3 - meta:
4 id: collector-go.d.plugin-consul
5 plugin_name: go.d.plugin
6 module_name: consul
7 monitored_instance:
8 name: Consul
9 link: https://www.consul.io/
10 categories:
11 - data-collection.applications
12 icon_filename: consul.svg
13 alternative_monitored_instances: []
14 related_resources:
15 integrations:
16 list: []
17 info_provided_to_referring_integrations:
18 description: ""
19 keywords:
20 - service networking platform
21 - hashicorp
22 - autopilot
23 overview:
24 data_collection:
25 metrics_description: |
26 This collector monitors [key metrics](https://developer.hashicorp.com/consul/docs/agent/telemetry#key-metrics) of Consul Agents: transaction timings, leadership changes, memory usage and more.
27 method_description: |
28 It periodically sends HTTP requests to [Consul REST API](https://developer.hashicorp.com/consul/api-docs).
29
30 Used endpoints:
31
32 - [/operator/autopilot/health](https://developer.hashicorp.com/consul/api-docs/operator/autopilot#read-health)
33 - [/agent/checks](https://developer.hashicorp.com/consul/api-docs/agent/check#list-checks)
34 - [/agent/self](https://developer.hashicorp.com/consul/api-docs/agent#read-configuration)
35 - [/agent/metrics](https://developer.hashicorp.com/consul/api-docs/agent#view-metrics)
36 - [/coordinate/nodes](https://developer.hashicorp.com/consul/api-docs/coordinate#read-lan-coordinates-for-all-nodes)
37 supported_platforms:
38 include: []
39 exclude: []
40 multi_instance: true
41 additional_permissions:
42 description: ""
43 default_behavior:
44 auto_detection:
45 description: |
46 This collector discovers instances running on the local host, that provide metrics on port 8500.
47
48 On startup, it tries to collect metrics from:
49
50 - http://localhost:8500
51 - http://127.0.0.1:8500
52 limits:
53 description: ""
54 performance_impact:
55 description: ""
56 setup:
57 prerequisites:
58 list:
59 - title: Enable Prometheus telemetry
60 description: |
61 [Enable](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-prometheus_retention_time) telemetry on your Consul Agent, by increasing the value of `prometheus_retention_time` from `0`.
62 - title: Add required ACLs to Token
63 description: |
64 Required **only if authentication is enabled**.
65
66 | ACL | Endpoint |
67 |:---------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
68 | `operator:read` | [autopilot health status](https://developer.hashicorp.com/consul/api-docs/operator/autopilot#read-health) |
69 | `node:read` | [checks](https://developer.hashicorp.com/consul/api-docs/agent/check#list-checks) |
70 | `agent:read` | [configuration](https://developer.hashicorp.com/consul/api-docs/agent#read-configuration), [metrics](https://developer.hashicorp.com/consul/api-docs/agent#view-metrics), and [lan coordinates](https://developer.hashicorp.com/consul/api-docs/coordinate#read-lan-coordinates-for-all-nodes) |
71 configuration:
72 file:
73 name: go.d/consul.conf
74 options:
75 description: |
76 The following options can be defined globally: update_every, autodetection_retry.
77 folding:
78 title: All options
79 enabled: true
80 list:
81 - name: update_every
82 description: Data collection interval (seconds).
83 default_value: 1
84 required: false
85 group: Collection
86 - name: autodetection_retry
87 description: Autodetection retry interval (seconds). Set 0 to disable.
88 default_value: 0
89 required: false
90 group: Collection
91
92 - name: url
93 description: Consul HTTP API URL.
94 default_value: http://localhost:8500
95 required: true
96 group: Target
97 - name: timeout
98 description: HTTP request timeout (seconds).
99 default_value: 1
100 required: false
101 group: Target
102
103 - name: acl_token
104 description: Consul ACL token sent with every request (`X-Consul-Token` header).
105 default_value: ""
106 required: false
107 group: HTTP Auth
108 - name: username
109 description: Username for Basic HTTP authentication.
110 default_value: ""
111 required: false
112 group: HTTP Auth
113 - name: password
114 description: Password for Basic HTTP authentication.
115 default_value: ""
116 required: false
117 group: HTTP Auth
118 - name: bearer_token_file
119 description: "Path to a file containing a bearer token (used for `Authorization: Bearer`)."
120 default_value: ""
121 required: false
122 group: HTTP Auth
123
124 - name: tls_skip_verify
125 description: Skip TLS certificate and hostname verification (insecure).
126 default_value: no
127 required: false
128 group: TLS
129 - name: tls_ca
130 description: Path to CA bundle used to validate the server certificate.
131 default_value: ""
132 required: false
133 group: TLS
134 - name: tls_cert
135 description: Path to client TLS certificate (for mTLS).
136 default_value: ""
137 required: false
138 group: TLS
139 - name: tls_key
140 description: Path to client TLS private key (for mTLS).
141 default_value: ""
142 required: false
143 group: TLS
144
145 - name: proxy_url
146 description: HTTP proxy URL.
147 default_value: ""
148 required: false
149 group: Proxy
150 - name: proxy_username
151 description: Username for proxy Basic HTTP authentication.
152 default_value: ""
153 required: false
154 group: Proxy
155 - name: proxy_password
156 description: Password for proxy Basic HTTP authentication.
157 default_value: ""
158 required: false
159 group: Proxy
160
161 - name: method
162 description: HTTP method to use.
163 default_value: GET
164 required: false
165 group: Request
166 - name: body
167 description: Request body (e.g., for POST/PUT).
168 default_value: ""
169 required: false
170 group: Request
171 - name: headers
172 description: "Additional HTTP headers (one per line as key: value)."
173 default_value: ""
174 required: false
175 group: Request
176 - name: not_follow_redirects
177 description: Do not follow HTTP redirects.
178 default_value: no
179 required: false
180 group: Request
181 - name: force_http2
182 description: Force HTTP/2 (including h2c over TCP).
183 default_value: no
184 required: false
185 group: Request
186
187 - name: vnode
188 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).
189 default_value: ""
190 required: false
191 group: Virtual Node
192 examples:
193 folding:
194 title: Config
195 enabled: true
196 list:
197 - name: Basic
198 description: An example configuration.
199 folding:
200 enabled: false
201 config: |
202 jobs:
203 - name: local
204 url: http://127.0.0.1:8500
205 acl_token: "ec15675e-2999-d789-832e-8c4794daa8d7"
206 - name: Basic HTTP auth
207 description: Local server with basic HTTP authentication.
208 config: |
209 jobs:
210 - name: local
211 url: http://127.0.0.1:8500
212 acl_token: "ec15675e-2999-d789-832e-8c4794daa8d7"
213 username: foo
214 password: bar
215 - name: Multi-instance
216 description: |
217 > **Note**: When you define multiple jobs, their names must be unique.
218
219 Collecting metrics from local and remote instances.
220 config: |
221 jobs:
222 - name: local
223 url: http://127.0.0.1:8500
224 acl_token: "ec15675e-2999-d789-832e-8c4794daa8d7"
225
226 - name: remote
227 url: http://203.0.113.10:8500
228 acl_token: "ada7f751-f654-8872-7f93-498e799158b6"
229 troubleshooting:
230 problems:
231 list: []
232 alerts:
233 - name: consul_node_health_check_status
234 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
235 metric: consul.node_health_check_status
236 info: node health check ${label:check_name} has failed on server ${label:node_name} datacenter ${label:datacenter}
237 - name: consul_service_health_check_status
238 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
239 metric: consul.service_health_check_status
240 info: service health check ${label:check_name} for service ${label:service_name} has failed on server ${label:node_name} datacenter ${label:datacenter}
241 - name: consul_client_rpc_requests_exceeded
242 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
243 metric: consul.client_rpc_requests_exceeded_rate
244 info: number of rate-limited RPC requests made by server ${label:node_name} datacenter ${label:datacenter}
245 - name: consul_client_rpc_requests_failed
246 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
247 metric: consul.client_rpc_requests_failed_rate
248 info: number of failed RPC requests made by server ${label:node_name} datacenter ${label:datacenter}
249 - name: consul_gc_pause_time
250 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
251 metric: consul.gc_pause_time
252 info: time spent in stop-the-world garbage collection pauses on server ${label:node_name} datacenter ${label:datacenter}
253 - name: consul_autopilot_health_status
254 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
255 metric: consul.autopilot_health_status
256 info: datacenter ${label:datacenter} cluster is unhealthy as reported by server ${label:node_name}
257 - name: consul_autopilot_server_health_status
258 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
259 metric: consul.autopilot_server_health_status
260 info: server ${label:node_name} from datacenter ${label:datacenter} is unhealthy
261 - name: consul_raft_leader_last_contact_time
262 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
263 metric: consul.raft_leader_last_contact_time
264 info: median time elapsed since leader server ${label:node_name} datacenter ${label:datacenter} was last able to contact the follower nodes
265 - name: consul_raft_leadership_transitions
266 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
267 metric: consul.raft_leadership_transitions_rate
268 info: there has been a leadership change and server ${label:node_name} datacenter ${label:datacenter} has become the leader
269 - name: consul_raft_thread_main_saturation
270 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
271 metric: consul.raft_thread_main_saturation_perc
272 info: average saturation of the main Raft goroutine on server ${label:node_name} datacenter ${label:datacenter}
273 - name: consul_raft_thread_fsm_saturation
274 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
275 metric: consul.raft_thread_fsm_saturation_perc
276 info: average saturation of the FSM Raft goroutine on server ${label:node_name} datacenter ${label:datacenter}
277 - name: consul_license_expiration_time
278 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/consul.conf
279 metric: consul.license_expiration_time
280 info: Consul Enterprise licence expiration time on node ${label:node_name} datacenter ${label:datacenter}
281 metrics:
282 folding:
283 title: Metrics
284 enabled: false
285 description: |
286 The set of metrics depends on the [Consul Agent mode](https://developer.hashicorp.com/consul/docs/install/glossary#agent).
287 availability:
288 - Leader
289 - Follower
290 - Client
291 scopes:
292 - name: global
293 description: These metrics refer to the entire monitored application.
294 labels: []
295 metrics:
296 - name: consul.client_rpc_requests_rate
297 description: Client RPC requests
298 unit: requests/s
299 chart_type: line
300 dimensions:
301 - name: rpc
302 - name: consul.client_rpc_requests_exceeded_rate
303 description: Client rate-limited RPC requests
304 unit: requests/s
305 chart_type: line
306 dimensions:
307 - name: exceeded
308 - name: consul.client_rpc_requests_failed_rate
309 description: Client failed RPC requests
310 unit: requests/s
311 chart_type: line
312 dimensions:
313 - name: failed
314 - name: consul.memory_allocated
315 description: Memory allocated by the Consul process
316 unit: bytes
317 chart_type: line
318 dimensions:
319 - name: allocated
320 - name: consul.memory_sys
321 description: Memory obtained from the OS
322 unit: bytes
323 chart_type: line
324 dimensions:
325 - name: sys
326 - name: consul.gc_pause_time
327 description: Garbage collection stop-the-world pause time
328 unit: seconds
329 chart_type: line
330 dimensions:
331 - name: gc_pause
332 - name: consul.kvs_apply_time
333 description: KVS apply time
334 unit: ms
335 chart_type: line
336 availability:
337 - Leader
338 - Follower
339 dimensions:
340 - name: quantile_0.5
341 - name: quantile_0.9
342 - name: quantile_0.99
343 - name: consul.kvs_apply_operations_rate
344 description: KVS apply operations
345 unit: ops/s
346 chart_type: line
347 availability:
348 - Leader
349 - Follower
350 dimensions:
351 - name: kvs_apply
352 - name: consul.txn_apply_time
353 description: Transaction apply time
354 unit: ms
355 chart_type: line
356 availability:
357 - Leader
358 - Follower
359 dimensions:
360 - name: quantile_0.5
361 - name: quantile_0.9
362 - name: quantile_0.99
363 - name: consul.txn_apply_operations_rate
364 description: Transaction apply operations
365 unit: ops/s
366 chart_type: line
367 availability:
368 - Leader
369 - Follower
370 dimensions:
371 - name: txn_apply
372 - name: consul.autopilot_health_status
373 description: Autopilot cluster health status
374 unit: status
375 chart_type: line
376 availability:
377 - Leader
378 - Follower
379 dimensions:
380 - name: healthy
381 - name: unhealthy
382 - name: consul.autopilot_failure_tolerance
383 description: Autopilot cluster failure tolerance
384 unit: servers
385 chart_type: line
386 availability:
387 - Leader
388 - Follower
389 dimensions:
390 - name: failure_tolerance
391 - name: consul.autopilot_server_health_status
392 description: Autopilot server health status
393 unit: status
394 chart_type: line
395 availability:
396 - Leader
397 - Follower
398 dimensions:
399 - name: healthy
400 - name: unhealthy
401 - name: consul.autopilot_server_stable_time
402 description: Autopilot server stable time
403 unit: seconds
404 chart_type: line
405 availability:
406 - Leader
407 - Follower
408 dimensions:
409 - name: stable
410 - name: consul.autopilot_server_serf_status
411 description: Autopilot server Serf status
412 unit: status
413 chart_type: line
414 availability:
415 - Leader
416 - Follower
417 dimensions:
418 - name: active
419 - name: failed
420 - name: left
421 - name: none
422 - name: consul.autopilot_server_voter_status
423 description: Autopilot server Raft voting membership
424 unit: status
425 chart_type: line
426 availability:
427 - Leader
428 - Follower
429 dimensions:
430 - name: voter
431 - name: not_voter
432 - name: consul.network_lan_rtt
433 description: Network lan RTT
434 unit: ms
435 chart_type: line
436 availability:
437 - Leader
438 - Follower
439 dimensions:
440 - name: min
441 - name: max
442 - name: avg
443 - name: consul.raft_commit_time
444 description: Raft commit time
445 unit: ms
446 chart_type: line
447 availability:
448 - Leader
449 dimensions:
450 - name: quantile_0.5
451 - name: quantile_0.9
452 - name: quantile_0.99
453 - name: consul.raft_commits_rate
454 description: Raft commits rate
455 unit: commits/s
456 chart_type: line
457 availability:
458 - Leader
459 dimensions:
460 - name: commits
461 - name: consul.raft_leader_last_contact_time
462 description: Raft leader last contact time
463 unit: ms
464 chart_type: line
465 availability:
466 - Leader
467 dimensions:
468 - name: quantile_0.5
469 - name: quantile_0.9
470 - name: quantile_0.99
471 - name: consul.raft_leader_oldest_log_age
472 description: Raft leader oldest log age
473 unit: seconds
474 chart_type: line
475 availability:
476 - Leader
477 dimensions:
478 - name: oldest_log_age
479 - name: consul.raft_follower_last_contact_leader_time
480 description: Raft follower last contact with the leader time
481 unit: ms
482 chart_type: line
483 availability:
484 - Follower
485 dimensions:
486 - name: leader_last_contact
487 - name: consul.raft_rpc_install_snapshot_time
488 description: Raft RPC install snapshot time
489 unit: ms
490 chart_type: line
491 availability:
492 - Follower
493 dimensions:
494 - name: quantile_0.5
495 - name: quantile_0.9
496 - name: quantile_0.99
497 - name: consul.raft_leader_elections_rate
498 description: Raft leader elections rate
499 unit: elections/s
500 chart_type: line
501 availability:
502 - Leader
503 - Follower
504 dimensions:
505 - name: leader
506 - name: consul.raft_leadership_transitions_rate
507 description: Raft leadership transitions rate
508 unit: transitions/s
509 chart_type: line
510 availability:
511 - Leader
512 - Follower
513 dimensions:
514 - name: leadership
515 - name: consul.server_leadership_status
516 description: Server leadership status
517 unit: status
518 chart_type: line
519 availability:
520 - Leader
521 - Follower
522 dimensions:
523 - name: leader
524 - name: not_leader
525 - name: consul.raft_thread_main_saturation_perc
526 description: Raft main thread saturation
527 unit: percentage
528 chart_type: line
529 availability:
530 - Leader
531 - Follower
532 dimensions:
533 - name: quantile_0.5
534 - name: quantile_0.9
535 - name: quantile_0.99
536 - name: consul.raft_thread_fsm_saturation_perc
537 description: Raft FSM thread saturation
538 unit: percentage
539 chart_type: line
540 availability:
541 - Leader
542 - Follower
543 dimensions:
544 - name: quantile_0.5
545 - name: quantile_0.9
546 - name: quantile_0.99
547 - name: consul.raft_fsm_last_restore_duration
548 description: Raft last restore duration
549 unit: ms
550 chart_type: line
551 availability:
552 - Leader
553 - Follower
554 dimensions:
555 - name: last_restore_duration
556 - name: consul.raft_boltdb_freelist_bytes
557 description: Raft BoltDB freelist
558 unit: bytes
559 chart_type: line
560 availability:
561 - Leader
562 - Follower
563 dimensions:
564 - name: freelist
565 - name: consul.raft_boltdb_logs_per_batch_rate
566 description: Raft BoltDB logs written per batch
567 unit: logs/s
568 chart_type: line
569 availability:
570 - Leader
571 - Follower
572 dimensions:
573 - name: written
574 - name: consul.raft_boltdb_store_logs_time
575 description: Raft BoltDB store logs time
576 unit: ms
577 chart_type: line
578 availability:
579 - Leader
580 - Follower
581 dimensions:
582 - name: quantile_0.5
583 - name: quantile_0.9
584 - name: quantile_0.99
585 - name: consul.license_expiration_time
586 description: License expiration time
587 unit: seconds
588 chart_type: line
589 dimensions:
590 - name: license_expiration
591 - name: node check
592 description: Metrics about checks on Node level.
593 labels:
594 - name: datacenter
595 description: Datacenter Identifier
596 - name: node_name
597 description: The node's name
598 - name: check_name
599 description: The check's name
600 metrics:
601 - name: consul.node_health_check_status
602 description: Node health check status
603 unit: status
604 chart_type: line
605 dimensions:
606 - name: passing
607 - name: maintenance
608 - name: warning
609 - name: critical
610 - name: service check
611 description: Metrics about checks at a Service level.
612 labels:
613 - name: datacenter
614 description: Datacenter Identifier
615 - name: node_name
616 description: The node's name
617 - name: check_name
618 description: The check's name
619 - name: service_name
620 description: The service's name
621 metrics:
622 - name: consul.service_health_check_status
623 description: Service health check status
624 unit: status
625 chart_type: line
626 dimensions:
627 - name: passing
628 - name: maintenance
629 - name: warning
630 - name: critical