File tree Expand file tree Collapse file tree 1 file changed +51
-2
lines changed Expand file tree Collapse file tree 1 file changed +51
-2
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,63 @@ The `Time_Format` should be aligned for the format of your using timestamp.
29
29
30
30
This example assumes the WASM program writes JSON style strings to ` stdout ` .
31
31
32
- ``` python
32
+ {% tabs %}
33
+ {% tab title="parsers.yaml" %}
34
+
35
+ ``` yaml
36
+ parsers :
37
+ - name : wasi
38
+ format : json
39
+ time_key : time
40
+ time_format : ' %Y-%m-%dT%H:%M:%S.%L %z'
41
+ ` ` `
42
+
43
+ {% endtab %}
44
+ {% tab title="parsers.conf" %}
45
+
46
+ ` ` ` text
33
47
[PARSER]
34
48
Name wasi
35
49
Format json
36
50
Time_Key time
37
51
Time_Format %Y-%m-%dT%H:%M:%S.%L %z
38
52
```
39
53
54
+ {% endtab %}
55
+ {% endtabs %}
56
+
40
57
Then, you can specify the ` parsers.conf ` in the main Fluent Bit configuration:
41
58
42
- ``` python
59
+ {% tabs %}
60
+ {% tab title="fluent-bit.yaml" %}
61
+
62
+ ``` yaml
63
+ service :
64
+ flush : 1
65
+ daemon : off
66
+ parsers_file : parsers.yaml
67
+ log_level : info
68
+ http_server : off
69
+ http_listen : 0.0.0.0
70
+ http_port : 2020
71
+
72
+ pipeline :
73
+ inputs :
74
+ - name : exec_wasi
75
+ tag : exec.wasi.local
76
+ wasi_path : /path/to/wasi/program.wasm
77
+ # Note: run from the 'wasi_path' location.
78
+ accessible_paths : /path/to/accessible
79
+
80
+ outputs :
81
+ - name : stdout
82
+ match : ' *'
83
+ ` ` `
84
+
85
+ {% endtab %}
86
+ {% tab title="fluent-bit.conf" %}
87
+
88
+ ` ` ` text
43
89
[SERVICE]
44
90
Flush 1
45
91
Daemon Off
@@ -61,3 +107,6 @@ Then, you can specify the `parsers.conf` in the main Fluent Bit configuration:
61
107
Match *
62
108
63
109
```
110
+
111
+ {% endtab %}
112
+ {% endtabs %}
You can’t perform that action at this time.
0 commit comments