Notice
Recent Posts
Recent Comments
Link
ยซ   2025/05   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
๊ด€๋ฆฌ ๋ฉ”๋‰ด

midnightly

[ELK Stack] ๊ตฌ์„ฑํ•˜๊ธฐ (4) - Filebeat ์„ค์น˜ ๋ณธ๋ฌธ

ELK

[ELK Stack] ๊ตฌ์„ฑํ•˜๊ธฐ (4) - Filebeat ์„ค์น˜

๋น„๋ฒ„๋ฒ„๋น„ 2021. 10. 15. 14:18

๐Ÿ“Œ ์„ค์น˜

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์— ์žˆ๋˜ ํŒŒ์ผ์ด ์ ์žฌ๋˜์—ˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

Comments