docs: 수정 - docker 입력은 메트릭 전용, tail+lua 필터 조합 필요

This commit is contained in:
happybell80 2025-09-29 12:23:26 +09:00
parent 2ad2678b42
commit 996d6a3fe7

View File

@ -34,14 +34,15 @@ tags: [fluent-bit, opensearch, logging, docker]
## 해결 방안
### 1. fluent-bit.conf 수정 - INPUT docker 사용
- 현재 tail 입력 제거
- docker 입력 플러그인으로 교체 (container_name 자동 추출)
- /var/run/docker.sock 마운트 필수
### 1. fluent-bit.conf 수정 - tail 유지 + lua 필터
- **docker 입력은 메트릭 전용** (로그 수집 불가)
- tail 입력 유지 필수
- lua 또는 modify 필터로 경로에서 컨테이너 ID 추출
- 예: `/var/lib/docker/containers/{container_id}/{container_id}-json.log`
### 2. docker-compose.yaml 수정
- 위치: `/home/happybell80/ivada_project/fluent-bit/docker-compose.yaml`
- 추가 필요: `/var/run/docker.sock:/var/run/docker.sock:ro` 마운트
### 2. docker-compose.yaml 수정 (필요 시)
- lua 필터에서 Docker API 호출 필요 시 `/var/run/docker.sock` 마운트
- 단순 경로 파싱만 한다면 불필요
### 3. Dockerfile 오류
- 13번 라인: `COPY certs/root.pem /fluent-bit/certs/root.pem`