Skip to content
This repository has been 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

Open
datbv opened this issue Feb 20, 2020 · 0 comments
Open

Comments

@datbv
Copy link

datbv commented Feb 20, 2020

  • 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"}]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant