Skip to content

Fluentd own log not always formatted as json ignoring explicit system configuration #2811

@AngryGami

Description

@AngryGami

Fluentd own log not always formatted as json ignoring explicit system configuration. Given following config:

<system>
  <log>
    format json
    time_format %FT%T.%L%z
  </log>
</system>
...

It sometimes produce non-json log entries in standard output (file buffer is always fine).
E.g.:

...
2020-01-31 14:52:48 +0000 [info]: Worker 0 finished with status 0
{"time":"2020-01-31T14:54:09.501+0000","level":"info","message":"parsing config file is succeeded path=\"/fluentd/etc/fluent.conf\""}
{"time":"2020-01-31T14:54:09.509+0000","level":"info","message":"gem 'fluent-plugin-concat' version '2.4.0'"}
{"time":"2020-01-31T14:54:09.511+0000","level":"info","message":"gem 'fluentd' version '1.9.0'"}
...

To reproduce I just used config as above and latest docker fluentd image, but probably also reproducible in 1.7.0. When started container with fluend I've connected to it using docker logs -f <my-container-id> and saw these messages.
Even when fluentd log is entirely suppressed like this:

<label @FLUENT_LOG>
  <match fluent.*>
    @type null
  </match>
</label>

These messages are still appear in stdout

Expected behavior
Either no such messages or they should be properly json formatted.

Your Environment
fluent/fluentd:v1.9-1 docker image from dockerhub with one additional plugin installed - fluent-plugin-concat, though I doubt it have anything to do with that.

  • Fluentd or td-agent version: 1.9.0
  • Operating system:
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.9.4
PRETTY_NAME="Alpine Linux v3.9"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
  • Kernel version: 4.15.0-1052-kvm

If you hit the problem with older fluentd version, try latest version first.

Your Configuration
See above. Other parts of configuration are irrelevant. I've used exactly same config with 1.6.0 and didn't have this problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions