`host` argument value in docker compose setting

オープン
#196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, docker-compose, kubernetes, python

調査の方向性

簡略化した Docker Compose YAML、fluentd/fluentd.conf の設定、そして test_server/async_fluentd.py から始めてください。リンクされている Fluent Logger Python の issue とコンテナネットワーキングのガイダンスを確認し、host 引数が何を表すべきかを判断してください。関連するサービス間接続の詳細と Kubernetes の制限事項を含む、検証済みの Compose セットアップを文書化できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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:

<source>
  @type forward
  port          24224
  <parse>
    @type json
  </parse>
</source>

<filter log.server>
  @type record_transformer
  <record>
    log_framework fluentd
    service_name  fluentd-test
    test          true
  </record>
</filter>

<match log.server>
  @type stdout
</match>

Context

The aim is to eventually deploy this on K8s, but that seems questionable at this point: see here and here. Fluentd's official doc also only mention this library in a non-containerized localhost scenario.

主要言語
Python
スター
457
フォーク
138
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fluent/fluent-logger-python のほかの issue

fluent/fluent-logger-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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