-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[etcd] Use prometheus metricset for etcd v3 metrics (#8438)
* add docker healthcheck * remove vars from test * use prometheus metricset * update docs * bump package version change input type improve titles and descriptions * fix sample eventt * disable v2 data streams by default * add additional v3 metrics * fix etcd policy template * update docs * add fields unit type remove duplicate field * update docs * add hosts global var bump to 0.7.0 * Update packages/etcd/_dev/build/docs/README.md Co-authored-by: Agi K Thomas <[email protected]> * update docs * set ecs version in pipeline * update dashboard * Update packages/etcd/changelog.yml Co-authored-by: Richa Talwar <[email protected]> * bump kibana version * change migration version * export with 8.7 * reoder lenses * replace dashboard image * fix ecs version in pipeline * update fields description * update sample event * update docs --------- Co-authored-by: Agi K Thomas <[email protected]> Co-authored-by: Richa Talwar <[email protected]>
- Loading branch information
1 parent
9130537
commit 131e7e7
Showing
18 changed files
with
919 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
ARG SERVICE_VERSION=${SERVICE_VERSION:-3.5.1} | ||
FROM bitnami/etcd:${SERVICE_VERSION} | ||
HEALTHCHECK --interval=15s --retries=90 CMD curl -f http://localhost:2379/metrics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ streams: | |
default: /metrics | ||
title: etcd leader metrics | ||
description: Collect etcd leader metrics | ||
enabled: false |
5 changes: 1 addition & 4 deletions
5
packages/etcd/data_stream/metrics/_dev/test/system/test-default-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
vars: | ||
hosts: | ||
- http://{{Hostname}}:2379 | ||
data_stream: | ||
vars: | ||
server_status_path: /metrics | ||
- http://{{Hostname}}:2379/metrics |
12 changes: 8 additions & 4 deletions
12
packages/etcd/data_stream/metrics/agent/stream/stream.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
metricsets: ["metrics"] | ||
metricsets: ["collector"] | ||
hosts: | ||
{{#each hosts}} | ||
- {{this}} | ||
{{/each}} | ||
metrics_filters.include: | ||
{{#each metrics_filters.include}} | ||
- {{this}} | ||
{{/each}} | ||
metrics_path: {{metrics_path}} | ||
period: {{period}} | ||
{{#if server_status_path}} | ||
server_status_path: {{server_status_path}} | ||
{{/if}} | ||
use_types: true | ||
rate_counters: false |
133 changes: 133 additions & 0 deletions
133
packages/etcd/data_stream/metrics/elasticsearch/ingest_pipeline/default.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
description: Pipeline for processing etcd v3 metrics. | ||
processors: | ||
- set: | ||
field: event.module | ||
value: etcd | ||
- set: | ||
field: ecs.version | ||
value: "8.5.1" | ||
- rename: | ||
field: prometheus.etcd_mvcc_db_total_size_in_bytes.value | ||
target_field: etcd.disk.mvcc_db_total_size.bytes | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_disk_wal_fsync_duration_seconds.histogram | ||
target_field: etcd.disk.wal_fsync_duration_seconds.histogram | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_disk_backend_commit_duration_seconds.histogram | ||
target_field: etcd.disk.backend_commit_duration_seconds.histogram | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.go_memstats_alloc_bytes.value | ||
target_field: etcd.memory.go_memstats_alloc.bytes | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.go_memstats_alloc_bytes_total.counter | ||
target_field: etcd.memory.go_memstats_alloc.total.bytes | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_client_grpc_sent_bytes_total.counter | ||
target_field: etcd.network.client_grpc_sent.bytes | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_client_grpc_received_bytes_total.counter | ||
target_field: etcd.network.client_grpc_received.bytes | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_server_has_leader.value | ||
target_field: etcd.server.has_leader.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_server_leader_changes_seen_total.counter | ||
target_field: etcd.server.leader_changes.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_server_proposals_committed_total.value | ||
target_field: etcd.server.proposals_committed.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_server_proposals_pending.value | ||
target_field: etcd.server.proposals_pending.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_server_proposals_failed_total.counter | ||
target_field: etcd.server.proposals_failed.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.grpc_server_started_total.counter | ||
target_field: etcd.server.grpc_started.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.grpc_server_handled_total.counter | ||
target_field: etcd.server.grpc_handled.count | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.process_start_time_seconds.value | ||
target_field: etcd.process_start_time.sec | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_peer_round_trip_time_seconds.histogram | ||
target_field: etcd.network.peer_round_trip_time_seconds.histogram | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_server_proposals_applied_total.value | ||
target_field: etcd.server.proposals_applied_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_peer_received_bytes_total.counter | ||
target_field: etcd.network.peer_received_bytes_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_peer_sent_bytes_total.counter | ||
target_field: etcd.network.peer_sent_bytes_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_peer_sent_failures_total.counter | ||
target_field: etcd.network.peer_sent_failures_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_network_peer_received_failures_total.counter | ||
target_field: etcd.network.peer_received_failures_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_debugging_store_writes_total.counter | ||
target_field: etcd.store.writes_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_debugging_store_expires_total.counter | ||
target_field: etcd.store.expires_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_debugging_store_reads_total.counter | ||
target_field: etcd.store.reads_total | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.etcd_debugging_store_watchers.value | ||
target_field: etcd.store.watchers | ||
ignore_missing: true | ||
- rename: | ||
field: prometheus.labels | ||
target_field: etcd.labels | ||
ignore_missing: true | ||
ignore_failure: true | ||
- fingerprint: | ||
fields: ["etcd.labels"] | ||
target_field: "etcd.labels.fingerprint" | ||
ignore_missing: true | ||
- remove: | ||
field: prometheus | ||
ignore_missing: true | ||
- set: | ||
field: event.kind | ||
value: pipeline_error | ||
if: ctx.error?.message != null | ||
on_failure: | ||
- set: | ||
field: error.message | ||
value: "{{{_ingest.on_failure_message}}}" | ||
- append: | ||
field: event.kind | ||
value: pipeline_error | ||
allow_duplicates: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,35 @@ | ||
- external: ecs | ||
name: host.ip | ||
- external: ecs | ||
name: ecs.version | ||
- external: ecs | ||
name: service.address | ||
- external: ecs | ||
name: service.type | ||
- name: ecs.version | ||
external: ecs | ||
- name: event.duration | ||
external: ecs | ||
- name: event.kind | ||
external: ecs | ||
- name: service.type | ||
external: ecs | ||
- name: service.address | ||
dimension: true | ||
external: ecs | ||
- name: agent.id | ||
dimension: true | ||
external: ecs | ||
- name: cloud.account.id | ||
dimension: true | ||
external: ecs | ||
- name: cloud.region | ||
dimension: true | ||
external: ecs | ||
- name: cloud.availability_zone | ||
dimension: true | ||
external: ecs | ||
- name: cloud.instance.id | ||
dimension: true | ||
external: ecs | ||
- name: cloud.provider | ||
dimension: true | ||
external: ecs | ||
- name: container.id | ||
dimension: true | ||
external: ecs | ||
- name: host.name | ||
dimension: true | ||
external: ecs |
Oops, something went wrong.