Skip to content

Commit 1761f9b

Browse files
committed
update docs about overriding configurations
1 parent 4c16184 commit 1761f9b

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

docs/configuring.idoc.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,48 @@ If `-http=':9090'` debug endpoints will be:
4444

4545
`http://127.0.0.1:9090/pipelines/http_file/2/sample` - for the join plugin
4646

47+
### Overriding configurations
48+
49+
You can use multiple configuration files. This allows you to define a base configuration (e.g., common.yaml) and override or extend it with additional configurations (e.g., local.yaml).
50+
51+
```
52+
./file.d
53+
--config=common.yaml
54+
--config=local.yaml
55+
```
56+
57+
```yaml
58+
# common.yaml
59+
pipelines:
60+
test1:
61+
input:
62+
...
63+
actions:
64+
- type: discard
65+
output:
66+
type: kafka
67+
68+
# local.yaml
69+
pipelines:
70+
test1:
71+
actions:
72+
- type: modify
73+
output:
74+
type: file
75+
76+
# result
77+
pipelines:
78+
test1:
79+
input:
80+
...
81+
actions:
82+
- type: modify
83+
output:
84+
type: file
85+
```
86+
87+
Arrays (or lists) are usually replaced entirely when merging configurations (e.g., actions). Dictionaries (or maps), on the other hand, are typically merged (e.g., output.type).
88+
4789
### Overriding by environment variables
4890

4991
`file.d` can override config fields if you specify environment variables with `FILED_` prefix.

docs/configuring.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,48 @@ If `-http=':9090'` debug endpoints will be:
4444

4545
`http://127.0.0.1:9090/pipelines/http_file/2/sample` - for the join plugin
4646

47+
### Overriding configurations
48+
49+
You can use multiple configuration files. This allows you to define a base configuration (e.g., common.yaml) and override or extend it with additional configurations (e.g., local.yaml).
50+
51+
```
52+
./file.d
53+
--config=common.yaml
54+
--config=local.yaml
55+
```
56+
57+
```yaml
58+
# common.yaml
59+
pipelines:
60+
test1:
61+
input:
62+
...
63+
actions:
64+
- type: discard
65+
output:
66+
type: kafka
67+
68+
# local.yaml
69+
pipelines:
70+
test1:
71+
actions:
72+
- type: modify
73+
output:
74+
type: file
75+
76+
# result
77+
pipelines:
78+
test1:
79+
input:
80+
...
81+
actions:
82+
- type: modify
83+
output:
84+
type: file
85+
```
86+
87+
Arrays (or lists) are usually replaced entirely when merging configurations (e.g., actions). Dictionaries (or maps), on the other hand, are typically merged (e.g., output.type).
88+
4789
### Overriding by environment variables
4890

4991
`file.d` can override config fields if you specify environment variables with `FILED_` prefix.

0 commit comments

Comments
 (0)