로그 관리를 위해서 ELK 를 쓰려다 서비스수준에 비해 과한것 같아 Graylog 를 와 비교하던중
ChatGPT에 물어보니 내 시스템에는
Fluent Bit + ES + Grafana
라는것을 추천해줬다.
1. Fluent Bit 설치
- https://docs.fluentbit.io/manual/installation/windows#installing-from-exe-installer
Windows | Fluent Bit: Official Manual
Open the Start menu on Windows and type command Prompt for VS. From the result list, select the one that corresponds to your target system ( x86 or x64).
docs.fluentbit.io
- fluent-bit.conf의 수정
[SERVICE]
storage.path D:/Work/Log/storage
[INPUT]
Name tail
Path D:\Work\Log\Game_*.log
Tag game.logs
DB D:/Work/Log/fluentbit.db
Parser json
Refresh_Interval 10
Rotate_Wait 5
[OUTPUT]
Name es
Match game.logs
Host localhost
Port 9200
Index glog
#es7.8 type field generate block!!!!
Suppress_Type_Name On
- 윈도에서 와일드 카드로 로그 파일 Path를 가져올때는 꼭 역슬러시\를 사용한다. 안그러면 못찾는다. 이것때문에 3시간 날림..
- ES 7/8부터 _type 필드가 deprecated됬는데 여전히 _type필드가 생성되는데 이거때문에 오류가 나면 Suppress_type_Name On 하면 생성안된다.
- 실행 할때 -c 옵션으로 conf 설정
fluent-bit.exe -c fluent-bit.conf
2. Elasticsearch 설치
- 사전 준비 : jdk 21 설치, JAVA_HOME 설정 - https://www.oracle.com/kr/java/technologies/downloads/#jdk21-windows
- https://www.elastic.co/downloads/elasticsearch
Download Elasticsearch
Download Elasticsearch or the complete Elastic Stack (formerly ELK stack) for free and start searching and analyzing in minutes with Elastic....
www.elastic.co
- 개발중 http접근 처리 : elasticsearch.yml을 열어 아래 false처리
# 보안 비활성화
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
# HTTP SSL 비활성화
xpack.security.http.ssl.enabled: false
# Node 간 통신 SSL도 비활성화 (옵션, 단일 노드라면 꺼도 됨)
xpack.security.transport.ssl.enabled: false
- elasticsearch.bat 를 관리자로 실행한다.
- fluent-bit.conf에서 [OUTPUT]에 설정된 Index 의 이름이 elasticsearch에 정상적 Index가 생성되었는지 확인했을때 해당 이름이 존재해야 한다.
curl -XGET http://localhost:9200/_cat/indices?v
3. https://grafana.com/grafana/download
Download Grafana | Grafana Labs
Overview of how to download and install different versions of Grafana on different operating systems.
grafana.com
'Development' 카테고리의 다른 글
Elasticsearch + Fluent Bit + Kibana (0) | 2025.04.28 |
---|---|
Windows OpenSSH 서버 Git저장소 Clone하기 (0) | 2024.05.05 |
[Jenkins] 젠킨스 설치 방법 (Windows) (0) | 2024.03.28 |