Search

filebeat 연동 (web)

아파치 설치

sudo apt install apache2
Bash
복사

소유자 수정 (안 해도 되나?)

sudo chown www-data:adm /var/log/apache2/*.log
Bash
복사

filebeat 설치

설치

패키지 설치

sudo apt install filebeat=7.16.2
Bash
복사

설정

sudo vi /etc/filebeat/filebeat.yml
Bash
복사
아래 내용으로 수정
filebeat.inputs: - type: log enabled: true paths: - /var/log/apache2/*.log output.elasticsearch: hosts: ["<Elasticsearch 서버 주소>:9200"]
Bash
복사
엘라스틱 서치와 로그스태시 수정

설정에 추가

seccomp: default_action: allow
Bash
복사

서비스 활성화 및 시작

sudo systemctl enable filebeat sudo systemctl start filebeat
Bash
복사