@@ -31,6 +31,24 @@ definition can optionally set one or more decoders. There are two types of decod
3131
3232Our pre-defined Docker parser has the following definition:
3333
34+ {% tabs %}
35+ {% tab title="parsers.yaml" %}
36+
37+ ``` yaml
38+ parsers :
39+ - name : docker
40+ format : json
41+ time_key : time
42+ time_format : ' %Y-%m-%dT%H:%M:%S.%L'
43+ time_keep : on
44+ # Command | Decoder | Field | Optional Action |
45+ # ==========|==========|=======|===================|
46+ decode_field_as : escaped log
47+ ` ` `
48+
49+ {% endtab %}
50+ {% tab title="parsers.conf" %}
51+
3452` ` ` text
3553[PARSER]
3654 Name docker
@@ -95,11 +113,32 @@ Example output:
95113", "stream"=>"stdout", "time"=>"2018-02-19T23:25:29.1845622Z"}]
96114```
97115
98- Decoder configuration file:
116+ Decoder example Fluent Bit configuration files:
117+
118+ {% tabs %}
119+ {% tab title="fluent-bit.yaml" %}
120+
121+ ``` yaml
122+ service :
123+ parsers_file : parsers.yaml
124+
125+ pipeline :
126+ inputs :
127+ - name : tail
128+ parser : docker
129+ path : /path/to/log.log
130+
131+ outputs :
132+ - name : stdout
133+ match : ' *'
134+ ` ` `
135+
136+ {% endtab %}
137+ {% tab title="fluent-bit.conf" %}
99138
100139` ` ` text
101140[SERVICE]
102- Parsers_File fluent-bit- parsers.conf
141+ Parsers_File parsers.conf
103142
104143[INPUT]
105144 Name tail
@@ -111,7 +150,25 @@ Decoder configuration file:
111150 Match *
112151```
113152
114- The ` fluent-bit-parsers.conf ` file:
153+ {% endtab %}
154+ {% endtabs %}
155+
156+ The example parsers file:
157+
158+ {% tabs %}
159+ {% tab title="parsers.yaml" %}
160+
161+ ``` yaml
162+ parsers :
163+ - name : docker
164+ format : json
165+ time_key : time
166+ time_format : ' %Y-%m-%dT%H:%M:%S %z'
167+ decode_field_as : escaped_utf8 log
168+ ` ` `
169+
170+ {% endtab %}
171+ {% tab title="parsers.conf" %}
115172
116173` ` ` text
117174[PARSER]
@@ -121,3 +178,6 @@ The `fluent-bit-parsers.conf` file:
121178 Time_Format %Y-%m-%dT%H:%M:%S %z
122179 Decode_Field_as escaped_utf8 log
123180```
181+
182+ {% endtab %}
183+ {% endtabs %}
0 commit comments