Fluentd
Search…
tsv
The tsv parser plugin parses the TSV format.

Parameters

keys

type
default
version
array of string
required parameter
0.14.9
The array of names for fields on each line.

delimiter

type
default
version
string
\t
0.14.0
The delimiter (character or string) separating TSV values.

Example

With this configuration:
1
<parse>
2
@type tsv
3
keys time,host,req_id,user
4
time_key time
5
</parse>
Copied!
This incoming event:
1
2013/02/28 12:00:00\t192.168.0.1\t111\t-
Copied!
is parsed as:
1
time:
2
1362020400 (2013/02/28/ 12:00:00)
3
4
record:
5
{
6
"host" : "192.168.0.1",
7
"req_id" : "111",
8
"user" : "-"
9
}
Copied!
If you set null_value_pattern '-' in the configuration, user field becomes nil instead of "-".
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last modified 4mo ago