diff --git a/SUMMARY.md b/SUMMARY.md index d61397a29..ba6d33fd5 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -125,12 +125,12 @@ * [Windows exporter metrics](pipeline/inputs/windows-exporter-metrics.md) * [Windows System Statistics (winstat)](pipeline/inputs/windows-system-statistics.md) * [Parsers](pipeline/parsers.md) - * [Configuring parsers](pipeline/parsers/configuring-parser.md) - * [Decoders](pipeline/parsers/decoders.md) - * [JSON](pipeline/parsers/json.md) - * [Logfmt](pipeline/parsers/logfmt.md) - * [LTSV](pipeline/parsers/ltsv.md) - * [Regular expression](pipeline/parsers/regular-expression.md) + * [Configuring custom parsers](pipeline/parsers/configuring-parser.md) + * [JSON format](pipeline/parsers/json.md) + * [Logfmt format](pipeline/parsers/logfmt.md) + * [LTSV format](pipeline/parsers/ltsv.md) + * [Regular expression format](pipeline/parsers/regular-expression.md) + * [Decoder settings](pipeline/parsers/decoders.md) * [Processors](pipeline/processors.md) * [Content modifier](pipeline/processors/content-modifier.md) * [Labels](pipeline/processors/labels.md) diff --git a/administration/configuring-fluent-bit/yaml.md b/administration/configuring-fluent-bit/yaml.md index f0edf6957..f352ab545 100644 --- a/administration/configuring-fluent-bit/yaml.md +++ b/administration/configuring-fluent-bit/yaml.md @@ -8,14 +8,14 @@ don't support, like processors. YAML configuration files support the following top-level sections: -- `env`: Configures [environment variables](./yaml/environment-variables-section). -- `includes`: Specifies additional YAML configuration files to [include as part of a parent file](./yaml/includes-section). -- `service`: Configures global properties of the Fluent Bit [service](./yaml/service-section). -- `pipeline`: Configures active [`inputs`, `filters`, and `outputs`](./yaml/pipeline-section). -- `parsers`: Defines [custom parsers](./yaml/parsers-section). -- `multiline_parsers`: Defines [custom multiline parsers](./yaml/multiline-parsers-section). -- `plugins`: Defines paths for [custom plugins](./yaml/plugins-section). -- `upstream_servers`: Defines [nodes](./yaml/upstream-servers-section) for output plugins. +- `env`: Configures [environment variables](../administration/configuring-fluent-bit/yaml/environment-variables-section.md). +- `includes`: Specifies additional YAML configuration files to [include as part of a parent file](../administration/configuring-fluent-bit/yaml/includes-section.md). +- `service`: Configures global properties of the Fluent Bit [service](../administration/configuring-fluent-bit/yaml/service-section.md). +- `pipeline`: Configures active [`inputs`, `filters`, and `outputs`](../administration/configuring-fluent-bit/yaml/pipeline-section.md). +- `parsers`: Defines [custom parsers](../administration/configuring-fluent-bit/yaml/parsers-section.md). +- `multiline_parsers`: Defines [custom multiline parsers](../administration/configuring-fluent-bit/yaml/multiline-parsers-section.md). +- `plugins`: Defines paths for [custom plugins](../administration/configuring-fluent-bit/yaml/plugins-section.md). +- `upstream_servers`: Defines [nodes](../administration/configuring-fluent-bit/yaml/upstream-servers-section.md) for output plugins. {% hint style="info" %} YAML configuration is used in the smoke tests for containers. An always-correct up-to-date example is here: . diff --git a/administration/configuring-fluent-bit/yaml/parsers-section.md b/administration/configuring-fluent-bit/yaml/parsers-section.md index 18198e11e..c8df40c1e 100644 --- a/administration/configuring-fluent-bit/yaml/parsers-section.md +++ b/administration/configuring-fluent-bit/yaml/parsers-section.md @@ -1,23 +1,86 @@ # Parsers -Parsers enable Fluent Bit components to transform unstructured data into a structured internal representation. You can define YAML parsers either directly in the main configuration file or in separate external files for better organization. +You can define customer [parsers](../pipeline/parsers.md) in the `parsers` section of YAML configuration files. -This page provides a general overview of how to declare parsers. +{% hint style="info" %} -The main section name is `parsers`, and it lets you define a list of parser configurations. The following example demonstrates how to set up two basic parsers: +To define custom multiline parsers, use [the `multiline_parsers` section](../administration/configuring-fluent-bit/yaml/multiline-parsers-section.md) of YAML configuration files. + +{% endhint %} + +## Syntax + +To define customers parsers in the `parsers` section of a YAML configuration file, use the following syntax. + +{% tabs %} +{% tab title="fluent-bit.yaml" %} ```yaml parsers: - - name: json + - name: custom_parser1 format: json + time_key: time + time_format: '%Y-%m-%dT%H:%M:%S.%L' + time_keep: on + + - name: custom_parser2 + format: regex + regex: '^\<(?[0-9]{1,5})\>1 (?