Output Formats
Some output plugins have a format configuration parameter. Supported values vary by plugin:
HTTP
gelf, json, json_lines, json_stream, msgpack
Kafka
avro (build-dependent), gelf, json, msgpack, raw
Standard Output
json, json_lines, json_stream, msgpack
TCP/TLS
json, json_lines, json_stream, msgpack
UDP
json, json_lines, json_stream, msgpack
WebSocket
gelf, json, json_lines, json_stream, msgpack
Some plugins, such as Kafka, support additional formats not listed here (for example, avro and raw). Always check the individual plugin documentation for the full list of supported values.
The format specifications and references to external documentation are available in this page.
JSON formats
The most custom format options are the JSON types. The following are common variants of sending JSON encoded data over various APIs.
The following example payloads are modified for readability.
Records shown in example payloads are the three first commits of the Fluent Bit repository.
json
jsonQueued records encoded as a single JSON array of JSON encoded Fluent Bit records.
Example payload
json_stream
json_streama.k.a. Concatenated JSON
Queued JSON-encoded Fluent Bit records, with no separator between records.
Example json_stream payload
json_stream payloadjson_lines
json_linesAlso known as newline-delimited JSON.
Queued JSON-encoded Fluent Bit records, separated by line-breaks (\n).
Example json_lines payload
json_lines payloadmsgpack
msgpackMessagePack is a binary format for serializing objects.
Refer to the official MessagePack format specification.
GELF
Graylog Extended Log Format (GELF) is a JSON based log format which is designed to avoid the shortcomings of classic plain syslog.
See the official documentation for the GELF format.
It uses a fixed set of keys, with the addition of adding custom keys prefixed by one single underscore character.
Example GELF payload
Here is an example payload, copied directly from the official documentation.
Last updated
Was this helpful?