Fluentd v1.11.1 has been released

Hi users!

We have released v1.11.1. ChangeLog is here.

in_http: Improve time field handling

in_http now supports time parsing in record field for default json/msgpack request. Here is configuration example:

<source>
  @type http
  @id input_http
  port 8888
  <parse>
    time_format %iso8601
    time_key logtime
    keep_time_key true
  </parse>
</source>

<match test.**>
  @type stdout
</match>

If you post following requests:

# ruby code example

require 'net/http'
require 'json'

record  = {'json' => {'k' => 'hello1', 'logtime' => '2020-06-10T11:14:27+09:00'}.to_json}
records = {'json' => [
  {'k' => 'hello2', 'logtime' => '2020-06-10T11:14:28+09:00'},
  {'k' => 'hello3', 'logtime' => '2020-06-10T11:14:29+09:00'}
].to_json}

def post(path, params)
  http = Net::HTTP.new('127.0.0.1', 8888)
  req  = Net::HTTP::Post.new(path, {})
  req.set_form_data(params)
  http.request(req)
end

post("/test.http", record)
post("/test.http", records)

the log shows expected result:

2020-06-10 11:14:27.000000000 +0900 test.http: { "k":"hello1","logtime":"2020-06-10T11:14:27+09:00"}
2020-06-10 11:14:28.000000000 +0900 test.http: { "k":"hello2","logtime":"2020-06-10T11:14:28+09:00"}
2020-06-10 11:14:29.000000000 +0900 test.http: { "k":"hello3","logtime":"2020-06-10T11:14:29+09:00"}

Before, this configuration doesn't work because in_http assumes the time value is floating point.

Major bug fixes

  • in_tail: Use actual path instead of base pattern for ignore list
  • child_process helper: Fix child process failure due to SIGPIPE if the command uses stdout

Enjoy logging!

Subscribed to the RSS feed here.

Written by Masahiro Nakagawa

Masahiro (@repeatedly) is the main maintainer of Fluentd. He works on Fluentd development and support full-time. He is also a committer of the D programming language.


About Fluentd

Fluentd is an open source data collector to unify log management.

Learn

Want to learn the basics of Fluentd? Check out these pages.

Ask the Community

Couldn't find enough information? Let's ask the community!

Ask the Experts

You need commercial-grade support from Fluentd committers and experts?

Follow Us!