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