Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Can we add docker log option to [OUTPUT] by using [MODIFY] or whatever? #28

@datbv

Description

@datbv
  • fluent-bit.conf
[SERVICE]
    Flush     2
    Daemon    off
    Log_Level info

[INPUT]
    Name      forward


[OUTPUT]
    Name      stdout
    Match     *
  • Fluent-bit running
docker run -it --rm -p 24224:24224 -v .../config:/fluent-bit/etc fluent/fluent-bit:latest
Fluent Bit v1.3.6
Copyright (C) Treasure Data

[2020/02/20 07:17:27] [ info] [storage] initializing...
[2020/02/20 07:17:27] [ info] [storage] in-memory
[2020/02/20 07:17:27] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/02/20 07:17:27] [ info] [engine] started (pid=1)
[2020/02/20 07:17:27] [ info] [in_fw] binding 0.0.0.0:24224
[2020/02/20 07:17:27] [ info] [sp] stream processor started
  • Start a container with log
docker run -it --rm --log-driver=fluentd --log-opt tag="some-tag" -t ubuntu echo "print something"
print something
  • Here is log from fluent-bit container
some-tag: [1582183276.000000000, {"container_id"=>"0027ad71f4f51df65633608d5174b7712d9d2f691436f4fa2852e40c25267d90", "container_name"=>"/lucid_wiles", "source"=>"stdout", "log"=>"test
"}]
  • The question is how can I pass some-tag into log info such as. We can do it with fluentd, but how in fluent-bit
some-tag: [1582183276.000000000, {"container_id"=>"0027ad71f4f51df65633608d5174b7712d9d2f691436f4fa2852e40c25267d90", "container_name"=>"/lucid_wiles", "source"=>"stdout", "log"=>"test", "tag"=>"some-tag"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions