fluent-bit: Exec plugin doesn't work in docker container
Bug Report
Describe the bug Exec input plugin doesn’t work using the docker image. Tested the same command in centos 7 downloading the package and works. I have an executable that send logs to stdout but just for testing purposes I executed the command described in the manual
To Reproduce
docker run fluent/fluent-bit:1.3.2-debug /fluent-bit/bin/fluent-bit -i exec -p 'command=ls /etc' -o stdout
output:
Fluent Bit v1.3.2
Copyright (C) Treasure Data
[2019/11/19 20:43:08] [ info] [storage] initializing...
[2019/11/19 20:43:08] [ info] [storage] in-memory
[2019/11/19 20:43:08] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2019/11/19 20:43:08] [ info] [engine] started (pid=1)
[2019/11/19 20:43:08] [ info] [sp] stream processor started
Expected behavior Show stdout of the command in the output like this
Fluent Bit v1.3.2
Copyright (C) Treasure Data
[2019/11/19 21:44:45] [ info] [storage] initializing...
[2019/11/19 21:44:45] [ info] [storage] in-memory
[2019/11/19 21:44:45] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2019/11/19 21:44:45] [ info] [engine] started (pid=23020)
[2019/11/19 21:44:45] [ info] [sp] stream processor started
[0] exec.0: [1574196286.008087197, {"exec"=>"adjtime"}]
[1] exec.0: [1574196286.008141435, {"exec"=>"aliases"}]
Screenshots
Your Environment
- Version used: fluent/fluent-bit:1.3.2-debug
- Configuration: command line from documentation examples
fluent-bit -i exec -p 'command=ls /var/log' -o stdout - Server type and version: docker 19.03.5
- Operating System and version: Macos 10.15.1 and Centos 7
- Filters and plugins: exec plugin
Additional context I have to launch an executable and read its stdout
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (8 by maintainers)
@patrick-stephens I agree.
@edsiper Which Dockerfile is to fix ?
https://github.com/fluent/fluent-bit/tree/master/dockerfiles or https://github.com/fluent/fluent-bit-docker-image
It seems like we should remove the exec plugin from the container if it’s not usable to keep it small and secure - plus make it obvious it won’t work before people try to debug it.