반응형
설치 스크립트
mkdir -p /home/ubuntu/app \
&& cd /home/ubuntu/app \
&& wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.9.1-linux-x86_64.tar.gz \
&& tar xvfz metricbeat-*.tar.gz \
&& rm metricbeat-*.tar.gz \
&& ln -s /home/ubuntu/app/metricbeat-* metricbeat
logstash 설정
- metricbeat의 데이터를 전달 받는 logstash 서버 설정
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
#user => "elastic"
#password => "changeme"
}
}
ELK에 metricbeat 첫 세팅시 대시보드 생성하기
- ./metricbeat.yml
setup.kibana: host: "192.168.56.14:5601" output.elasticsearch: hosts: ["192.168.56.14:9200"]
- Kibana 대시보드 생성
./metricbeat setup --dashboards
metricbeat.yml
- ./metricbeat.yml
metricbeat.modules:
- module: system
metricsets:
- cpu # CPU usage
# - load # CPU load averages
- memory # Memory usage
- network # Network IO
- process # Per process metrics
# - process_summary # Process summary
# - uptime # System Uptime
# - socket_summary # Socket summary
# - core # Per CPU core usage
- diskio # Disk IO
# - filesystem # File system usage for each mountpoint
# - fsstat # File system summary metrics
# - raid # Raid
# - socket # Sockets and connection info (linux only)
# - service # systemd service information
enabled: true
period: 15s
processes: ['.*']
# Configure the metric types that are included by these metricsets.
cpu.metrics: ["percentages"] # The other available option is ticks.
core.metrics: ["percentages"] # The other available option is ticks.
# setup.kibana:
# host: "192.168.56.14:5601"
# output.elasticsearch:
# hosts: ["192.168.56.14:9200"]
output.logstash:
hosts: ["192.168.56.14:5044"]
실행
./metricbeat -c metricbeat.yml
Kibana 대시보드 확인
- [Metricbeat System] Containers overview ECS
- [Metricbeat System] Host overview ECS
참고
반응형
'Development > ELK' 카테고리의 다른 글
[Elastalert] 설치 (0) | 2020.12.28 |
---|---|
[Elasticsearch] Query (0) | 2020.12.28 |
[Elasticsearch] 설정 (0) | 2019.03.17 |
[Filebeat] 설정 (0) | 2019.03.02 |
[Filebeat] 설치 (1) | 2019.03.01 |