`host` argument value in docker compose setting

Đang mở
#196 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
docker, docker-compose, kubernetes, python
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

Bắt đầu với Docker Compose YAML đã được rút gọn, cấu hình fluentd/fluentd.conf và test_server/async_fluentd.py. Xem lại các issue Fluent Logger Python được liên kết và hướng dẫn về mạng container để xác định đối số host nên đại diện cho điều gì. Hoàn thành có nghĩa là tài liệu hóa một thiết lập Compose đã được xác minh, bao gồm các chi tiết liên quan đến kết nối giữa các service và mọi giới hạn của Kubernetes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
457
Fork
138
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fluent/fluent-logger-python

Tất cả issue của fluent/fluent-logger-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.