parser
Last updated
Was this helpful?
Last updated
Was this helpful?
The filter_parser
filter plugin "parses" string field in event records and mutates its event record with parsed result.
filter_parser
is included in Fluentd's core since v0.12.29. No installation required. If you want to use filter_parser
with lower fluentd versions, need to install fluent-plugin-parser
.
filter_parser
has just same with in_tail
about format
and time_format
:
filter_parser
uses built-in parser plugins and your own customized parser plugin, so you can re-use pre-defined format like apache
, json
and etc. See document page for more details:
This is required parameter. Specify parser format or regexp pattern.
This is required parameter. Specify field name in the record to parse.
Keep original key-value pair in parsed result. Default is false
.
With above configuration, result is below:
Without reserve_data
, result is below
If true
, a plugin suppresses pattern not match
warning log. Default is false
.
This parameter is useful for parsing mixed logs and you want to ignore non target lines.
Ignore "key not exist" log. Default is false
.
Useful case is same with suppress_parse_error_log
.
If true
, invalid string is replaced with safe characters and re-parse it. Default is false
.
Store parsed values with specified key name prefix. Default is nil
.
With above configuration, result is below:
Store parsed values as a hash value in a field. Default is nil
.
With above configuration, result is below:
If false, time parsing is disabled in the parser. Default is true.
Emit invalid record to @ERROR
label. Default is false
. Invalid cases are
key not exist
format is not matched
unexpected error
You can rescue unexpected format logs in @ERROR
label.
If this article is incorrect or outdated, or omits critical information, please . is a open source project under . All components are available under the Apache 2 License.