Skip to content

Commit 923997b

Browse files
committed
Adding YAML examples and layout fixes for Flowcounter output plugin. Part of issue #1909.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent d562adb commit 923997b

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

pipeline/outputs/flowcounter.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,52 @@ You can run the plugin from the command line or through the configuration file:
1919

2020
From the command line you can let Fluent Bit count up a data with the following options:
2121

22-
```bash
22+
```shell
2323
fluent-bit -i cpu -o flowcounter
2424
```
2525

2626
### Configuration File
2727

28-
In your main configuration file append the following Input & Output sections:
28+
In your main configuration file append the following:
29+
30+
{% tabs %}
31+
{% tab title="fluent-bit.yaml" %}
32+
33+
```yaml
34+
pipeline:
35+
inputs:
36+
- name: cpu
37+
tag: cpu
38+
39+
outputs:
40+
- name: flowcounter
41+
match: '*'
42+
unit: second
43+
```
44+
45+
{% endtab %}
46+
{% tab title="fluent-bit.conf" %}
2947
30-
```python
48+
```text
3149
[INPUT]
32-
Name cpu
33-
Tag cpu
50+
Name cpu
51+
Tag cpu
3452

3553
[OUTPUT]
36-
Name flowcounter
37-
Match *
38-
Unit second
54+
Name flowcounter
55+
Match *
56+
Unit second
3957
```
4058

59+
{% endtab %}
60+
{% endtabs %}
61+
4162
## Testing
4263

4364
Once Fluent Bit is running, you will see the reports in the output interface similar to this:
4465

45-
```bash
46-
$ fluent-bit -i cpu -o flowcounter
47-
Fluent Bit v1.x.x
48-
* Copyright (C) 2019-2020 The Fluent Bit Authors
49-
* Copyright (C) 2015-2018 Treasure Data
50-
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
51-
* https://fluentbit.io
52-
53-
[2016/12/23 11:01:20] [ info] [engine] started
66+
```text
67+
...
5468
[out_flowcounter] cpu.0:[1482458540, {"counts":60, "bytes":7560, "counts/minute":1, "bytes/minute":126 }]
55-
```
69+
...
70+
```

0 commit comments

Comments
 (0)