Skip to content

Commit a11c35b

Browse files
committed
in_http: Update for parser plugin
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
1 parent 4530560 commit a11c35b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

plugins/input/http.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,14 @@ supported parameters
185185

186186
Without `<transport tls>`, in\_http uses HTTP.
187187

188+
### `<parse>` directive
189+
190+
Use parser plugin to parse incoming data. See also [Handle other formats using parser plugins](#handle-other-formats-using-parser-plugins) section.
191+
188192

189193
### format (deprecated)
190194

191-
Deprecated parameter. Use the `<parse>` directive [as explained below](#handle-various-formats-using-parser-plugins) instead.
195+
Deprecated parameter. Use `<parse>` directive instead.
192196

193197

194198
## Tips & Tricks
@@ -227,7 +231,7 @@ $ curl -X POST -d "$msgpack" -H 'Content-Type: application/msgpack' \
227231

228232
### Handle other formats using parser plugins
229233

230-
You can handle various input formats by using the `<parser>` directive.
234+
You can handle various input formats by using the `<parse>` directive.
231235
For example, add the following settings to the configuration file:
232236

233237
```
@@ -251,9 +255,9 @@ $ curl -X POST -d '123456:awesome' http://localhost:9880/app.log
251255
Many other formats (e.g. csv/syslog/nginx) are also supported as well.
252256
You can find the full list of supported formats in ["Parser Plugin Overview"](/plugins/parser/README.md).
253257

254-
Note that parser plugins do not support [the batch mode](#handle-large-data-with-batch-mode). So if you want to use bulk
258+
Note: Some parser plugins do not support [the batch mode](#handle-large-data-with-batch-mode). So if you want to use bulk
255259
insertion for handling a large data set, please consider to keep using
256-
the default JSON (or MessagePack) format.
260+
the default JSON (or MessagePack) format or write batch mode supported parser(return array object).
257261

258262

259263
## Enhance Performance
@@ -266,7 +270,7 @@ a JSON/MessagePack array.
266270

267271
```
268272
# Send multiple events as a JSON array
269-
$ curl -X POST -d "json=[{"foo":"bar"},{"abc":"def"},{"xyz":"123"}]" \
273+
$ curl -X POST -d 'json=[{"foo":"bar"},{"abc":"def"},{"xyz":"123"}]' \
270274
http://localhost:9880/app.log
271275
```
272276

0 commit comments

Comments
 (0)