midnightly
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (4) - Filebeat ์ค์น ๋ณธ๋ฌธ
๐ ์ค์น
4. Beats (๐ข root ๊ถํ์ผ๋ก ์คํ)
(1) FileBeat ๋ค์ด & ์์ถ ํ๊ธฐ
- https://www.elastic.co/kr/downloads/beats/filebeat ์ ์ํด์ LINUX X86_64 ๋งํฌ ์ฃผ์ ๋ณต์ฌ ํด๋ฆญ
- root ๊ณ์ ์ผ๋ก ์ ํํ๋ค.
exit
- elastic ํด๋๋ก ์ด๋ํด์ wget์ผ๋ก ํ์ผ ๋ค์ด
cd /home/elastic/
wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.15.1-linux-x86_64.tar.gz
- ์์ถ ํด์
tar -xvzf filebeat-7.15.1-linux-x86_64.tar.gz
(2) filebeat.yml ์์
- filebeat.yml ํ์ผ์ ์์ ํ๋ค.
# ============================== Filebeat inputs ===============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /home/elastic/log/*
.
.
.
# ---------------------------- 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: "changeme"
# ------------------------------ Logstash Output -------------------------------
output.logstash:
# The Logstash hosts
hosts: ["192.168.137.101:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
(3) ์คํ
- Filebeat๋ฅผ ์คํํ๋ค.
./filebeat -e -c filebeat.yml
- Kibana -> Stack Management -> Data -> Index Management
- filebeat.yml path์ ์๋ ํ์ผ์ด ์ ์ฌ๋์์์ ํ์ธํ ์ ์๋ค.
'ELK' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (3) - LogStash ์ค์น (0) | 2021.10.15 |
---|---|
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (2) - Kibana ์ค์น (0) | 2021.10.15 |
[ELK Stack] ๊ตฌ์ฑํ๊ธฐ (1) - Elasticsearch ์ค์น (0) | 2021.10.14 |
Comments