Skip to content

Commit 68fdca3

Browse files
committed
Adding YAML examples for throttle filter doc. Part of issue #1872.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 6c0233d commit 68fdca3

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

pipeline/filters/throttle.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The last pane of the window was overwritten and 1 message was dropped.
6767

6868
### Interval versus Window size
6969

70-
You might notice it's possible to configure the `Interval` of the `Window` shift. It's counter intuitive, but there is a difference between the two previous examples:
70+
You might notice it's possible to configure the `Interval` of the `Window` shift. It's counterintuitive, but there is a difference between the two previous examples:
7171

7272
```text
7373
Rate 60
@@ -117,7 +117,31 @@ bin/fluent-bit -i tail -p 'path=lines.txt' -F throttle -p 'rate=1' -m '*' -o std
117117

118118
### Configuration File
119119

120-
```python
120+
{% tabs %}
121+
{% tab title="fluent-bit.yaml" %}
122+
123+
```yaml
124+
pipeline:
125+
inputs:
126+
- name: tail
127+
path: lines.txt
128+
129+
filters:
130+
- name: throttle
131+
match: '*'
132+
rate: 1000
133+
window: 300
134+
interval: 1s
135+
136+
outputs:
137+
- name: stdout
138+
match: '*'
139+
```
140+
141+
{% endtab %}
142+
{% tab title="fluent-bit.conf" %}
143+
144+
```text
121145
[INPUT]
122146
Name tail
123147
Path lines.txt
@@ -134,4 +158,7 @@ bin/fluent-bit -i tail -p 'path=lines.txt' -F throttle -p 'rate=1' -m '*' -o std
134158
Match *
135159
```
136160

137-
This example will pass 1000 messages per second in average over 300 seconds.
161+
{% endtab %}
162+
{% endtabs %}
163+
164+
This example will pass 1000 messages per second in average over 300 seconds.

0 commit comments

Comments
 (0)