Hey all, I am trying to get the following run for ...
# fluent-bit
s
Hey all, I am trying to get the following run for hours but it simply does not work. I want to build a minimal showcase via docker-compse with a simple NodeJS application that constantly performs console.logs to simulate logging and a fluent-bit instance that listens to these logs and simply prints them to its stdout. Unfortunately, I never see somehting on the stdout of the fluent-bit container. Here is my docker-compose:
Copy code
services:
  logger-app:
    build:
      context: ./node-logger-app
      dockerfile: Dockerfile
    container_name: node-logger-app
    environment:
      - NODE_ENV=production
    logging:
      driver: fluentd
      options:
        fluentd-address: fluentbit:24224
        fluentd-async: "true"
    networks:
      - logging-network
  fluentbit:
    image: fluent/fluent-bit:latest
    volumes:
      - ./fluent-bit/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf:ro
    networks:
      - logging-network
networks:
  logging-network:
    name: logging-network
    driver: bridge
and here is my fluent-bit.conf
Copy code
[SERVICE]
    Flush        1
    Daemon       Off
    Log_Level    debug

[INPUT]
    Name         forward
    Listen       0.0.0.0
    Port         24224

[OUTPUT]
    Name   stdout
    Match  *
p
The logging driver config is for the container runtime so I guess it may not know that you are forwarding to that internal container you've set up, so a DNS problem. Ultimately though it's hard to say and the logs may show you the actual error. An alternative is to log to a file in a shared volume and just consume that via the tail input. That's more like the normal usage