Disable time and tags in fluentd stdout output plugin

8/29/2019

Remove time and tag from fluentd output plugin stdout with json

Fluentd's output plugin produces output like:

2017-11-28 11:43:13.814351757 +0900 tag: {"field1":"value1","field2":"value2"}

So timestamp and tag are before the json. How can I remove these fields - I only like to have the json output

<match pattern>
  @type stdout
</match>

expected output: {"field1":"value1","field2":"value2"}

-- tommes
fluentd
kubernetes
plugins

2 Answers

8/30/2019

Did you try filters?

<filter pattern>
  @type record_transformer
  <record>
      ${tag}
  </record>
</filter>
-- Bimal
Source: StackOverflow

2/4/2020

Set the json format type which by default doesn't includes time and tag in output:

<match pattern>
  @type stdout
  <format>
    @type json
  </format>
</match>
-- Sergio Perez Rodriguez
Source: StackOverflow