Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
parser_json: Document new stream_buffer_size param
Browse files Browse the repository at this point in the history
See fluent/fluentd#2381

In addition to documenting the parameter, update the `in_exec` and
`out_exec_filter` articles to provide a workaround for users
encountering this problem.
This note exists in the v0.12 version of the `in_exec` page but was
absent in the v1.0 docs, so add the whole note.

Closes #624

Signed-off-by: Ben Wheatley <contact@benwh.com>
  • Loading branch information
benwh committed Apr 14, 2019
1 parent 2e23a10 commit 2f681b3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/v1.0/in_exec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ You can run a program periodically or permanently. To run periodically, please u

NOTE: Please see the <a href="config-file">Config File</a> article for the basic structure and syntax of the configuration file.

NOTE: When using the json format in &lt;parse&gt; section, this plugin uses the Yajl library to parse the program output. Yajl buffers data internally so the output isn't always instantaneous. See the LINK:[parser_json](parser_json#stream_buffer_size) documentation to adjust this.

## Plugin helpers

* [compat_parameters](api-plugin-helper-compat_parameters)
Expand Down
2 changes: 1 addition & 1 deletion docs/v1.0/out_exec_filter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The `out_exec_filter` Buffered Output plugin (1) executes an external program us

NOTE: Please see the LINK:[Config File](config-file) article for the basic structure and syntax of the configuration file.

NOTE: When using the json format in &lt;parse&gt; section, this plugin uses the Yajl library to parse the program output. Yajl buffers data internally so the output isn't always instantaneous.
NOTE: When using the json format in &lt;parse&gt; section, this plugin uses the Yajl library to parse the program output. Yajl buffers data internally so the output isn't always instantaneous. See the LINK:[parser_json](parser_json#stream_buffer_size) documentation to adjust this.

## Supported modes

Expand Down
11 changes: 11 additions & 0 deletions docs/v1.0/parser_json.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ See [Parse section configurations](parse-section)

Set JSON parser.

### stream_buffer_size

| type | default | version |
|:-------:|:-------:|:-------:|
| integer | 8092 | 1.4.3 |

The amount of data, in bytes, that the Yajl parser will wait for before parsing and emitting JSON objects.
See the [Yajl documentation](https://www.rubydoc.info/github/brianmario/yajl-ruby/Yajl%2FParser:parse) for further details.

This will only take effect when the parser is being to process an IO stream, e.g. in the context of the `out_exec_filter` or `in_exec` plugins.

## Example

:::text
Expand Down

0 comments on commit 2f681b3

Please sign in to comment.