`host` argument value in docker compose setting

Aperta
#196 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
docker, docker-compose, kubernetes, python

Direzione di ricerca

Inizia con il YAML Docker Compose ridotto, la configurazione fluentd/fluentd.conf e test_server/async_fluentd.py. Esamina le issue collegate di Fluent Logger Python e le indicazioni sul networking dei container per determinare cosa dovrebbe rappresentare l’argomento host. Il lavoro è completato quando è documentata una configurazione Compose verificata, inclusi i dettagli rilevanti della connessione tra i servizi e le eventuali limitazioni di Kubernetes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
457
Fork
138
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluent/fluent-logger-python

Tutte le issue di fluent/fluent-logger-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.