fluent / fluent/fluent-logger-python

`host` argument value in docker compose setting

オープン
#196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。