You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding YAML examples to configuring parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
* Fixed type on yaml parser types field in configuring parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
* Adding YAML examples to regular expression parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
* Adding YAML examples to logfmt parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
* Adding YAML examples to JSON parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
* Adding YAML examples to LTSV parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
* Adding YAML examples to decoders parser doc. Part of issue fluent#1865.
Signed-off-by: Eric D. Schabell <[email protected]>
---------
Signed-off-by: Eric D. Schabell <[email protected]>
Signed-off-by: Tom <[email protected]>
Copy file name to clipboardExpand all lines: pipeline/parsers/configuring-parser.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,9 @@ By default, Fluent Bit provides a set of pre-configured parsers that can be used
18
18
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.
19
19
20
20
{% hint style="info" %}
21
+
21
22
Fluent Bit uses Ruby-based regular expressions. You can use [Rubular](http://www.rubular.com) to test your regular expressions for Ruby compatibility.
23
+
22
24
{% endhint %}
23
25
24
26
## Configuration parameters
@@ -43,7 +45,30 @@ Multiple parsers can be defined and each section has it own properties. The foll
43
45
44
46
## Parsers configuration file
45
47
46
-
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:
48
+
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:
@@ -63,6 +88,9 @@ All parsers must be defined in a `parsers.conf` file, not in the Fluent Bit glob
63
88
Types pid:integer
64
89
```
65
90
91
+
{% endtab %}
92
+
{% endtabs %}
93
+
66
94
For more information about the parsers available, refer to the [default parsers file](https://github.com/fluent/fluent-bit/blob/master/conf/parsers.conf) distributed with Fluent Bit source code.
67
95
68
96
## Time resolution and fractional seconds
@@ -72,7 +100,9 @@ Time resolution and its format supported are handled by using the [strftime\(3\)
72
100
In addition, Fluent Bit extends its time resolution to support fractional seconds like `017-05-17T15:44:31**.187512963**Z`. The `%L` format option for `Time_Format` is provided as a way to indicate that content must be interpreted as fractional seconds.
73
101
74
102
{% hint style="info" %}
103
+
75
104
The option `%L` is only valid when used after seconds (`%S`) or seconds since the epoch (`%s`). For example, `%S.%L` and `%s.%L` are valid strings.
105
+
76
106
{% endhint %}
77
107
78
108
## Supported time zone abbreviations
@@ -172,7 +202,9 @@ The following time zone abbreviations are supported.
172
202
### Military time zones
173
203
174
204
{% hint style="info" %}
205
+
175
206
These are single-letter UTC offset designators. `J` (Juliet) represents local time and is not included. `Z` represents Zulu Time, as listed in the [Universal time zones](#universal-time-zones) list.
207
+
176
208
{% endhint %}
177
209
178
210
| Abbreviation | UTC Offset (`HH:MM`) | Offset (seconds) | Is DST | Description |
@@ -200,4 +232,4 @@ These are single-letter UTC offset designators. `J` (Juliet) represents local ti
Copy file name to clipboardExpand all lines: pipeline/parsers/logfmt.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,29 @@
2
2
3
3
The **logfmt** parser allows to parse the logfmt format described in [https://brandur.org/logfmt](https://brandur.org/logfmt) . A more formal description is in [https://godoc.org/github.com/kr/logfmt](https://godoc.org/github.com/kr/logfmt) .
4
4
5
-
Here is an example configuration:
5
+
Here is an example parsers configuration:
6
6
7
-
```python
7
+
{% tabs %}
8
+
{% tab title="parsers.yaml" %}
9
+
10
+
```yaml
11
+
parsers:
12
+
- name: logfmt
13
+
format: logfmt
14
+
```
15
+
16
+
{% endtab %}
17
+
{% tab title="parsers.conf" %}
18
+
19
+
```text
8
20
[PARSER]
9
21
Name logfmt
10
22
Format logfmt
11
23
```
12
24
25
+
{% endtab %}
26
+
{% endtabs %}
27
+
13
28
The following log entry is a valid content for the parser defined above:
14
29
15
30
```text
@@ -27,9 +42,25 @@ After processing, it internal representation will be:
27
42
If you want to be more strict than the logfmt standard and not parse lines where some attributes do
28
43
not have values (such as `key3`) in the example above, you can configure the parser as follows:
0 commit comments