fluent / fluent/fluent-logger-python
`host` argument value in docker compose setting
- 主要語言
- Python
- 星號
- 457
- 分支
- 138
- PR 合併指標
- 30 天內沒有已合併 PR
描述
hey there,
# Problem
i'm trying to test this out in a docker compose setting, but struggling to get the `fluentd` service to receive the logs being sent by the application using the fluentd logger in another service. reduced docker compose yaml:
# Approach
```
services:
test-server:
profiles: [fluentd]
build:
context: ./test_server
dockerfile: Dockerfile
image: fluentd-logging-server
command: [python, /home/fluent-logging/test_server/test_server async_fluentd.py]
environment:
LOG_FILE: /home/fluent-logging/logs/dummy-input-server.log
TAG: log.server # populates `tag` positional argument of the fluentd async handler
HOST: localhost # populates `host` keyword argument of the fluentd async handler
PORT: 24224 # populates `port` keyword argument of the fluentd async handler
volumes:
- type: bind
source: ./
target: /home/fluent-logging
fluentd:
profiles: [fluentd]
build:
context: ./fluentd
dockerfile: Dockerfile
image: fluentd-logging-daemon
command: fluentd -c /etc/fluent/fluent.conf -v
ports:
- "24224:24224"
- "24224:24224/udp"
volumes:
- type: bind
source: ./fluentd/fluentd.conf
target: /etc/fluent/fluent.conf
```
reduced fluentd config:
```
@type forward
port 24224
@type json
@type record_transformer
log_framework fluentd
service_name fluentd-test
test true
@type stdout
```
# Context
The aim is to eventually deploy this on K8s, but that seems questionable at this point: see [here ](https://github.com/fluent/fluent-logger-python/issues/124) and [here](https://github.com/fluent/fluent-logger-python/issues/147). Fluentd's official doc also[ only mention this library in a non-containerized localhost scenario](https://docs.fluentd.org/language-bindings/python#using-fluent-logger-python).
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start with the reduced Docker Compose YAML, the fluentd/fluentd.conf configuration, and test_server/async_fluentd.py. Review the linked Fluent Logger Python issues and container networking guidance to determine what the host argument should represent. Done means documenting a verified Compose setup, including the relevant service-to-service connection details and any Kubernetes limitations.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- docker, docker-compose, kubernetes, python
- 領域
- devops, infrastructure
- Issue 類型
- 文件
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100