HTTP
The HTTP input plugin lets Fluent Bit open an HTTP port that you can then route data to in a dynamic way.
Configuration parameters
buffer_chunk_size
This sets the chunk size for incoming JSON messages. These chunks are then stored and managed in the space available by buffer_max_size.
512K
buffer_max_size
Specify the maximum buffer size to receive a JSON message.
4M
http2
Enable HTTP/2 support.
true
listen
The address to listen on.
0.0.0.0
port
The port for Fluent Bit to listen on.
9880
success_header
Add an HTTP header key/value pair on success. Multiple headers can be set. For example, X-Custom custom-answer.
none
successful_response_code
Allows setting successful response code. Supported values: 200, 201, and 204.
201
tag_key
Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key.
none
TLS / SSL
HTTP input plugin supports TLS/SSL. For more details about the properties available and general configuration, refer to Transport Security.
gzipped content
The HTTP input plugin will accept and automatically handle gzipped content in version 2.2.1 or later if the header Content-Encoding: gzip is set on the received data.
Get started
This plugin supports dynamic tags which let you send data with different tags through the same input. See the following for an example:
Set a tag
The tag for the HTTP input plugin is set by adding the tag to the end of the request URL. This tag is then used to route the event through the system.
For example, in the following curl message the tag set is app.log because the end path is /app.log:
Configuration file
Configuration file http.0 example
http.0 exampleIf you don't set the tag, http.0 is automatically used. If you have multiple HTTP inputs then they will follow a pattern of http.N where N is an integer representing the input.
Set tag_key
tag_keyThe tag_key configuration option lets you specify the key name that will be used to overwrite a tag. The tag's value will be replaced with the value associated with the specified key. For example, setting tag_key to custom_tag and the log event contains a JSON field with the key custom_tag. Fluent Bit will use the value of that field as the new tag for routing the event through the system.
Curl request
Configuration file tag_key example
tag_key exampleSet multiple custom HTTP headers on success
The success_header parameter lets you set multiple HTTP headers on success. The format is:
Example curl message
Configuration file example 3
Command line
Last updated
Was this helpful?