메트릭비트 설치
Metricbeat 패키지 설치
yum install --enablerepo=elasticsearch -y metricbeat
Metricbeat 설정(metricbeat.yml)을 확인합니다.
cat /etc/metricbeat/metricbeat.yml | egrep -v '^$|^#|#'
$ cat /etc/metricbeat/metricbeat.yml | egrep -v '^$|^#|#'
metricbeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
setup.kibana:
output.elasticsearch:
hosts: ("localhost:9200")
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
Metricbeat에서 Elasticsearch x-pack 모듈 활성화 및 구성
cd /etc/metricbeat
$ ls -l modules.d/ | grep elasticsearch-xpack
-rw-r--r-- 1 root root 261 Feb 12 13:40 elasticsearch-xpack.yml.disabled
/usr/bin/metricbeat modules enable elasticsearch-xpack
$ ls -l modules.d/ | grep elasticsearch-xpack
-rw-r--r-- 1 root root 261 Feb 12 13:40 elasticsearch-xpack.yml
메트릭 수집 모듈 활성화 및 구성
metricbeat modules list
$ metricbeat modules list
Enabled:
elasticsearch-xpack
system
Disabled:
activemq
aerospike
...
systemctl --now enable metricbeat
systemctl status metricbeat
Metricbeat 구성
vim /etc/metricbeat/metricbeat.yml
output.elasticsearch:
# Array of hosts to connect to.
hosts: ("localhost:9200")
# Protocol - either `http` (default) or `https`.
protocol: "https"
# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
username: "elastic"
password: "elastic"
systemctl restart metricbeat
참조 URL
– 설정 리포지토리: https://www.elastic.co/guide/en/beats/metricbeat/8.6/setup-repositories.html