http Input Plugin

The in_http Input plugin enables Fluentd to retrieve records from HTTP POST. The URL path becomes the tag of the Fluentd event log and the POSTed body element becomes the record itself.

Example Configuration

in_http is included in Fluentd’s core. No additional installation process is required.

  type http
  port 8888
  body_size_limit 32m
  keepalive_timeout 10s
Please see the Config File article for the basic structure and syntax of the configuration file.

Example Usage

The example below posts a record using the curl command.

$ curl -X POST -d 'json={"action":"login","user":2}'


type (required)

The value must be http.


The port to listen to. Default Value = 9880


The bind address to listen to. Default Value = (all addresses)


The size limit of the POSTed element. Default Value = 32MB


The timeout limit for keeping the connection alive. Default Value = 10 seconds


Add HTTP_ prefix headers to the record. The default is false


The format of the HTTP body. The default is default.

  • default

Accept records using json= / msgpack= style.

  • regexp

Specify body format by regular expression.

format /^(?<field1>\d+):(?<field2>\w+)$/

If you execute following command:

$ curl -X POST -d '123456:awesome' "http://localhost:8888/"

then got parsed result like below:


json, ltsv, tsv, csv and none are also supported.

log_level option

The log_level option allows the user to set different levels of logging for each plugin. The supported log levels are: fatal, error, warn, info, debug, and trace.

Please see the logging article for further details.

time query parameter

If you want to pass the event time from your application, please use the time query parameter.

$ curl -X POST -d 'json={"action":"login","user":2}'

Batch mode

If you use default format, then you can send array type of json / msgpack to in_http.

$ curl -X POST -d 'json=[{"action":"login","user":2,"time":1392021185},{"action":"logout","user":2,"time":1392027356}]'

Non default format doesn’t support batch mode yet.

Last updated: 2016-06-06 04:47:13 UTC

If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.