Skip to content

Commit b3bdb00

Browse files
committed
Fixed config doc error and general cleanup on exec wasi input plugin doc. Fixes #2247.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 107f2fa commit b3bdb00

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

pipeline/inputs/exec-wasi.md

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ The _Exec WASI_ input plugin lets you execute Wasm programs that are WASI target
66

77
The plugin supports the following configuration parameters:
88

9-
| Key | Description |
10-
|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
11-
| `WASI_Path` | The location of a Wasm program file. |
12-
| `Parser` | Specify the name of a parser to interpret the entry as a structured message. |
13-
| `Accessible_Paths` | Specify the allowed list of paths to be able to access paths from Wasm programs. |
14-
| `Interval_Sec` | Polling interval (seconds). |
15-
| `Interval_NSec` | Polling interval (nanosecond). |
16-
| `Wasm_Heap_Size` | Size of the heap size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit.md#unit-sizes) for allowed values. |
17-
| `Wasm_Stack_Size` | Size of the stack size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit.md#unit-sizes) for allowed values. |
18-
| `Buf_Size` | Size of the buffer See [unit sizes](../../administration/configuring-fluent-bit.md#unit-sizes) for allowed values. |
19-
| `Oneshot` | Only run once at startup. This allows collection of data precedent to the Fluent Bit startup (Boolean, default: `false`). |
20-
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). Default: `false`. |
9+
| Key | Description | Default |
10+
|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------|:--------|
11+
| `accessible_paths` | Specify the allowed list of paths to be able to access paths from Wasm programs. | `.` |
12+
| `buf_size` | Size of the buffer. Review [unit sizes](../../administration/configuring-fluent-bit.md#unit-sizes) for allowed values. | `4096` |
13+
| `interval_nsec` | Polling interval (nanosecond). | `0` |
14+
| `interval_sec` | Polling interval (seconds). | `1` |
15+
| `oneshot` | Execute the command only once at startup. | `false` |
16+
| `parser` | Specify the name of a parser to interpret the entry as a structured message. | |
17+
| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
18+
| `wasi_path` | The location of a Wasm program file. | |
19+
| `wasm_heap_size` | Size of the heap size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit.md#unit-sizes) for allowed values. | `8192` |
20+
| `wasm_stack_size` | Size of the stack size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit.md#unit-sizes) for allowed values. | `8192` |
2121

2222
## Configuration examples
2323

2424
Here is a configuration example.
2525

2626
`in_exec_wasi` can handle parsers. To retrieve from structured data from a Wasm program, you must create a `parser.conf`:
2727

28-
The `Time_Format` should be aligned for the format of your using timestamp.
28+
The `time_format` should be aligned for the format of your using timestamp.
2929

3030
This example assumes the Wasm program writes JSON style strings to `stdout`.
3131

@@ -34,21 +34,21 @@ This example assumes the Wasm program writes JSON style strings to `stdout`.
3434

3535
```yaml
3636
parsers:
37-
- name: wasi
38-
format: json
39-
time_key: time
40-
time_format: '%Y-%m-%dT%H:%M:%S.%L %z'
37+
- name: wasi
38+
format: json
39+
time_key: time
40+
time_format: '%Y-%m-%dT%H:%M:%S.%L %z'
4141
```
4242
4343
{% endtab %}
4444
{% tab title="parsers.conf" %}
4545
4646
```text
4747
[PARSER]
48-
Name wasi
49-
Format json
50-
Time_Key time
51-
Time_Format %Y-%m-%dT%H:%M:%S.%L %z
48+
Name wasi
49+
Format json
50+
Time_Key time
51+
Time_Format %Y-%m-%dT%H:%M:%S.%L %z
5252
```
5353

5454
{% endtab %}
@@ -61,50 +61,50 @@ Then, you can specify the `parsers.conf` in the main Fluent Bit configuration:
6161

6262
```yaml
6363
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
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
7171

7272
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: '*'
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: '*'
8383
```
8484
8585
{% endtab %}
8686
{% tab title="fluent-bit.conf" %}
8787
8888
```text
8989
[SERVICE]
90-
Flush 1
91-
Daemon Off
92-
Parsers_File parsers.conf
93-
Log_Level info
94-
HTTP_Server Off
95-
HTTP_Listen 0.0.0.0
96-
HTTP_Port 2020
90+
Flush 1
91+
Daemon Off
92+
Parsers_File parsers.conf
93+
Log_Level info
94+
HTTP_Server Off
95+
HTTP_Listen 0.0.0.0
96+
HTTP_Port 2020
9797

9898
[INPUT]
99-
Name exec_wasi
100-
Tag exec.wasi.local
101-
WASI_Path /path/to/wasi/program.wasm
102-
Accessible_Paths .,/path/to/accessible
103-
Parser wasi
99+
Name exec_wasi
100+
Tag exec.wasi.local
101+
WASI_Path /path/to/wasi/program.wasm
102+
Accessible_Paths .,/path/to/accessible
103+
Parser wasi
104104

105105
[OUTPUT]
106-
Name stdout
107-
Match *
106+
Name stdout
107+
Match *
108108

109109
```
110110

0 commit comments

Comments
 (0)