728x90
Ubuntu 환경에서 Filebeat 설치하는 방법
패키지 저장소 업데이트
sudo apt-get update
Filebeat 패키지 설치
apt-get install -y filebeat
$ cat /etc/filebeat/filebeat.yml | egrep -v '^$|#'
filebeat.inputs:
- type: filestream
id: my-filestream-id
enabled: false
paths:
- /var/log/*.log
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
setup.kibana:
output.elasticsearch:
hosts: ["localhost:9200"]
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
Filebeat 설정 파일을 편집
vim /etc/filebeat/filebeat.yml
output.elasticsearch:
hosts: ["your_elasticsearch_host:9200"]
filebeat.inputs:
- type: log
enabled: true
paths:
- /path/to/your/logs/*.log
systemctl --now enable filebeat.service
systemctl status filebeat.service
참고URL
- filebeat 설치하는 방법 : https://www.elastic.co/guide/en/beats/filebeat/8.6/setup-repositories.html
728x90
'리눅스' 카테고리의 다른 글
[리눅스] Siege의 설치 방법과 사용 방법 (0) | 2023.03.22 |
---|---|
[리눅스] find 명령어 (0) | 2023.03.20 |
[리눅스] Ubuntu 환경에서 Metricbeat 설치하는 방법 (0) | 2023.03.17 |
[리눅스] Ubuntu 환경에서 Elasticsearch와 Kibana를 설치하고 연동하는 방법(single node) (0) | 2023.03.17 |
[리눅스] PHP의 설정 파일(php.ini) 위치 찾기 (0) | 2023.03.17 |