Metricbeat란?
시스템과 서비스에서 메트릭 수집과 CPU부터 메모리, Redis, NGINX까지 Metricbeat를 통해 다양한 시스템 서비스 통계를 가볍게 전송할 수 있는 경량 메트릭 수집기
설치
https://www.elastic.co/kr/downloads/beats/metricbeat
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install metricbeat
수정
nano /etc/metricbeat/metricbeat.yml
보안 기능 활성화 일 경우 주석 해체후 아이디, 비밀번호 기입
# =================================== Kibana ===================================
# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:
# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
host: "localhost:5601" # 주석 해체
# Kibana Space ID
# ID of the Kibana Space into which the dashboards should be loaded. By default,
# the Default Space will be used.
#space.id:
# ---------------------------- Elasticsearch Output ----------------------------
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: "XwAvjFelq11RDZ1k2YEH"
시작
sudo systemctl start metricbeat && sudo systemctl enable metricbeat
확인

