-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Adding plugin ID suppress all plugin logs #2248
Comments
I confirmed the issue. Now investigating. |
Okay, I found the cause. |
Patch is here: #2252 |
@repeatedly Awesome, thanks a lot! As far as I see the CI/CD is failing, can I still install this patched version and use or it is not going to work? If not then when is expected this commit to be released officially? Also, is a way I have created this report helpful or it is not worth it to create this Docker snippet etc? |
@repeatedly I've managed to build Fluentd from source (commit with your patch #2252) and then build Docker image. I can confirm that bug is no longer there on this version. When is expected you patch will be merged and officially released? Edit: I've built it using this commit: 1cc9b27 so it does not include the latest commit of yours in this pull request (at least 1 at the time of writing this comment). |
Thanks for the testing! We need review for the patch from other developers before merge. |
@repeatedly When is expected the docker images to be updated? I mean that image for |
I'm now working on td-agent 3.3.0 release. After that, I will work on it. |
@repeatedly I think there is some bigger problem with the Fluentd internal logs. It does not work as expected. I have found another log that is suppressed: https://github.com/fluent/fluentd/blob/v1.3.3/lib/fluent/supervisor.rb#L124-L125 I've tested it on newest version (after your patch from this issue), that is Problem is the same. Logs are visible in
...but does not reach any plugin, hence it's impossible to actually log this records. Added following to my configuration:
Action I do is:
Should I expand my "reproducing" snippet with Docker that I've prepared before? |
Above logs are generated in supervisor, not worker. |
TL;DR
Adding
@id
option to any plugin configuration makes Fluentd logs to be suppressed. Fluentd logs are not delivered into output plugins. Can be replicated within seconds - I've added small Docker Compose project.This is quite important problem as I want to add plugin IDs to track Fluentd metrics and logs. This behaviour makes tracking errors and metrics impossible.
Basic info:
v1.3.2-1.0
(latest Docker image)edge
(v1.3.2-1.0
) andedge-debian
(v1.3.2-debian-1.0
) Docker images.17.05.0-ce, build 89658be
version 1.20.1, build 5d8c71b
14.04
, specifically:4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
My configuration
Full configuration needed to replicate below. I've uploaded it here too.
So the configuration is consisting of:
Replication
So let's stream via TCP
invalid_string
string:This should cause an error. I properly see error in
docker logs
:So error is visible in Docker logs but is not streamed into a
/tmp/logs/fluentd
as configuration says. However, when I remove@id awesome_source_id
part from output configuration then everything works properly. The following is then streamed into the file too:Problem
I want to track Fluentd errors and metrics. I want to have plugin ID visible so I know what is what. This behaviour makes tracking errors and metrics very difficult.
Scope
Happens for many plugins. At least: in
forward
, outelasticsearch
, filterparser
, outfile
,record_transformer
. In this configuration I am streaming everything into a file but in my production use I am streaming it into Elasticsearch. That is why I think it is not a matter of any plugin but rather Fluentd itself.Replication with Docker
Can be replicated using Docker within a few seconds. You can find the project to help with replication here: https://github.com/kmotrebski/random/tree/master/20181231_fluentd_suppressing_internal_logs_problem
Just copy&paste:
You will see that no errors are added to the
logs/fluentd
. But if you comment ID declaration:and try again by
./reproducing.sh
you will see that errors are properly added to the file.The text was updated successfully, but these errors were encountered: