[Elastic][observability] Metricbeat
Updated:
설명
- https://www.elastic.co/guide/en/beats/metricbeat/7.x/index.html
- 매트릭 수집을 위한 Beat
- 수집 가능한 모듈
- 출력 가능한 모듈
- 설정
- 수집할 모듈 추가
- prometheus 예시
- remote_write의 경우 prometheus에 remote_write 설정 필요
- Metricbeat에서 해당 주소를 LISTEN하고 prometheus가 주기적으로 해당 주소로 출력
- prometheus 예시
- 수집할 모듈 추가
설치
- yaml
- Elasticsearch 데이터
- prometheus
{ "took" : 534, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : { "value" : 69, "relation" : "eq" }, "max_score" : 3.3673677, "hits" : [ { "_index" : "metricbeat-2021.04.08-000001", "_type" : "_doc", "_id" : "GwkesXgBcFi5np7qphoD", "_score" : 3.3673677, "_source" : { "@timestamp" : "2021-04-08T10:54:38.711Z", "host" : { "name" : "worker-node" }, "agent" : { "type" : "metricbeat", "version" : "7.11.2", "hostname" : "worker-node", "ephemeral_id" : "0b8605eb-1c2e-4647-9730-5734bac11440", "id" : "4ed35698-26f4-42f7-989d-c65c0f18cb8e", "name" : "worker-node" }, "prometheus" : { "labels" : { "job" : "prometheus", "instance" : "prometheus_ip:prometheus_port" }, "metrics" : { "prometheus_tsdb_wal_fsync_duration_seconds_sum" : 1.4930206880000005, "prometheus_tsdb_wal_corruptions_total" : 0, "process_start_time_seconds" : 1.616908127E9, ... }, "event" : { "module" : "prometheus", "duration" : 22565352, "dataset" : "prometheus.collector" }, "metricset" : { "name" : "collector", "period" : 60000 }, "service" : { "address" : "http://prometheus_ip:prometheus_port/metrics", "type" : "prometheus" }, "ecs" : { "version" : "1.7.0" } } }, ...
- prometheus