fluent / fluentd-docs

This repository is deprecated. Go to fluentd-docs-gitbook repository.
49 stars 119 forks source link

buffer-section#other-keys isn't correct #499

Closed ahrtr closed 6 years ago

ahrtr commented 6 years ago

Per the following guide, <buffer key1> should work. But actully 'tag' must be included as well, otherwise, fluentd can't be started. https://docs.fluentd.org/v1.0/articles/buffer-section#other-keys

fujimotos commented 6 years ago

I've set up a testing environment and confirmed that a <buffer> section without tag works just fine as the documentation describs.

Configuration

<source>
  @type http
</source>
<match debug.**>
  @type file
  path /tmp/data/fluentd_${key}
  <buffer key>
    @type memory
    flush_interval 5s
  </buffer>
</match>

Execution log

$ fluentd -c test.conf &
...
2018-05-28 14:19:18 +0900 [info]: #0 fluentd worker is now running worker=0
$ curl  -d 'json={"key":"xyz"}' http://localhost:9880/debug.log
$ curl  -d 'json={"key":"abc"}' http://localhost:9880/debug.log
$ curl  -d 'json={"key":"def"}' http://localhost:9880/debug.log
$ ls /tmp/data/
fluentd_abc_0.log  fluentd_xyz_0.log fluentd_def_0.log

I'm guessing that your configuration was not set up correctly. Can you post your configuration file here?

repeatedly commented 6 years ago

https://github.com/uken/fluent-plugin-elasticsearch/blob/3c51449bd6f9f4d26f9d1abea0a9909d119cea90/lib/fluent/plugin/out_elasticsearch.rb#L118

This is elasticsearch plugin limitation. So closed.