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

parser_json: Document new stream_buffer_size param #631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | 8192 | 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 used to process an IO stream, e.g. in the context of the `out_exec_filter` or `in_exec` plugins.

## Example

:::text
Expand Down