Filebeat 설치

2025. 1. 31. 17:00EFK

정형화된 로그 파일들만 지원함

빈파일은 가져오지 않음

참조: https://www.elastic.co/kr/downloads/beats/filebeat

 

Download Filebeat • Lightweight Log Analysis

Download Filebeat, the open source data shipper for log file data that sends logs to Logstash for enrichment and Elasticsearch for storage and analysis....

www.elastic.co

msi 파일 다운로드 받아서 설치

스크립트 실행

# 관리자 권한으로 파워쉘창 실행
.\install-service-filebeat.ps1

filebeat.yml 파일 수정

filebeat.inputs:
- type: filestream
  id: my-filestream-id
  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - {디렉토리}
    


setup.kibana:
  host: "{http(s)://도메인:포트}"
  

output.elasticsearch:
  hosts: ["{도메인:포트}"]
  preset: balanced
  protocol: "{http or https}"

  # Authentication credentials - either API key or username/password.
  api_key: "{api key값}"

자산등록 및 실행

PS > .\filebeat.exe setup -e

PS > Start-Service filebeat

 

대쉬보드 등록: kibana에 작업할 수 있는 권한이 있어야 함

PS > .\filebeat.exe setup --dashboards

하위 디렉토리까지 모두 찾기

# filebeat.yml 수정
  paths:
    - {디렉토리}\**\*
    
    
# filebeat 서비스 재시작안해도 됨