[과제]
Metricbeat와 Filebeat는 실시간 로그/메트릭 수집 에이전트이고, logstash의 pipeline.yml에 각 beat 로 부터 들어오는 데이터를 처리할 파이프라인들을 등록하여 동시 실행한다.
Metricbeat 의 포트번호 = 5045
Filebeat 의 포트번호 = 5044
[버전]
8.17.4 tar
[서버]
192.168.219.159 (master) : Elasticsearch, Kibana, Logstash, CA 인증서
192.168.219.157 (data) : Elasticsearch, Metricbeat
192.168.219.158 (data) : Elasticsearch
firewall-cmd --permanent --add-port=5045/tcp
firewall-cmd --reload
firewall-cmd --list-all
[elastic@localhost metricbeat-8.17.4-linux-x86_64]$ sudo vi metricbeat.yml
# Logstash Output
output.logstash:
# The Logstash hosts
hosts: ["192.168.219.159:5045"]
[elastic@localhost logstash-8.17.4]$ vi config/metric.conf
input {
beats {
port => 5045
}
}
output {
elasticsearch {
hosts => ["https://192.168.219.159:9200"]
cacert => "/home/elastic/elasticsearch-8.17.4/config/certs/http_ca.crt"
index => "metricbeat_logs_from_logstash"
user => "elastic"
password => "elastic"
}
stdout {}
}
[elastic@localhost logstash-8.17.4]$ vi config/pipelines.yml
- pipeline.id: metricbeat_pipeline
path.config: "/home/elastic/logstash-8.17.4/config/metric.conf"
- pipeline.id: filebeat_pipeline
path.config: "/home/elastic/logstash-8.17.4/config/filebeat.conf"
# 포그라운드
./bin/logstash
sudo ./filebeat -e -c filebeat.yml
sudo ./metricbeat -e -c metricbeat.yml
# 백그라운드 실행
nohup sudo ./filebeat -e -c filebeat.yml &
nohup sudo ./metricbeat -e -c metricbeat.yml &
./metricbeat test config
./metricbeat test output
./filebeat test config
./filebeat test output


curl -XGET "http://localhost:9600/_node/pipelines?pretty"
