From c2e140e634fcea04d718019139b66caa13f372c0 Mon Sep 17 00:00:00 2001 From: "Eric D. Schabell" Date: Fri, 4 Jul 2025 15:34:32 +0200 Subject: [PATCH 1/7] Adding YAML examples to configuring parser doc. Part of issue #1865. Signed-off-by: Eric D. Schabell --- pipeline/parsers/configuring-parser.md | 36 ++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/pipeline/parsers/configuring-parser.md b/pipeline/parsers/configuring-parser.md index b503fad3c..4dfb144ba 100644 --- a/pipeline/parsers/configuring-parser.md +++ b/pipeline/parsers/configuring-parser.md @@ -18,7 +18,9 @@ By default, Fluent Bit provides a set of pre-configured parsers that can be used Parsers are defined in one or more configuration files that are loaded at start time, either from the command line or through the main Fluent Bit configuration file. {% hint style="info" %} + Fluent Bit uses Ruby-based regular expressions. You can use [Rubular](http://www.rubular.com) to test your regular expressions for Ruby compatibility. + {% endhint %} ## Configuration parameters @@ -43,7 +45,30 @@ Multiple parsers can be defined and each section has it own properties. The foll ## Parsers configuration file -All parsers must be defined in a `parsers.conf` file, not in the Fluent Bit global configuration file. The parsers file exposes all parsers available that can be used by the input plugins that are aware of this feature. A parsers file can have multiple entries, like so: +All parsers must be defined in a parsers file (see below for examples), not in the Fluent Bit global configuration file. The parsers file exposes all parsers available that can be used by the input plugins that are aware of this feature. A parsers file can have multiple entries, like so: + +{% tabs %} +{% tab title="parsers.yaml" %} + +```yaml +parsers: + - name: docker + format: json + time_key: time + time_format: '%Y-%m-%dT%H:%M:%S.%L' + time_keep: on + + - name: syslog-rfc5424 + format: regex + regex: '^\<(?[0-9]{1,5})\>1 (?