Skip to content

Commit 80dd36c

Browse files
authored
Fixing shell commands, adding YAML standards for memory metrics input plugin docs. Fixes #1817. (#1818)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent cd9e74f commit 80dd36c

File tree

1 file changed

+43
-27
lines changed

1 file changed

+43
-27
lines changed

pipeline/inputs/memory-metrics.md

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,42 @@ To get memory and swap usage from your system, you can run the plugin from the c
88

99
### Command line
1010

11-
Run the following command from the command line:
11+
Run the following command from the command line, noting this is for a Linux machine:
1212

13-
```bash
14-
fluent-bit -i mem -t memory -o stdout -m '*'
13+
```shell
14+
$ fluent-bit -i mem -t memory -o stdout -m '*'
1515
```
1616

1717
Which outputs information similar to:
1818

1919
```text
20-
Fluent Bit v1.x.x
21-
* Copyright (C) 2019-2020 The Fluent Bit Authors
22-
* Copyright (C) 2015-2018 Treasure Data
20+
Fluent Bit v4.0.3
21+
* Copyright (C) 2015-2025 The Fluent Bit Authors
2322
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
2423
* https://fluentbit.io
2524
26-
[2017/03/03 21:12:35] [ info] [engine] started
27-
[0] memory: [1488543156, {"Mem.total"=>1016044, "Mem.used"=>841388, "Mem.free"=>174656, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
28-
[1] memory: [1488543157, {"Mem.total"=>1016044, "Mem.used"=>841420, "Mem.free"=>174624, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
29-
[2] memory: [1488543158, {"Mem.total"=>1016044, "Mem.used"=>841420, "Mem.free"=>174624, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
30-
[3] memory: [1488543159, {"Mem.total"=>1016044, "Mem.used"=>841420, "Mem.free"=>174624, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
25+
______ _ _ ______ _ _ ___ _____
26+
| ___| | | | | ___ (_) | / || _ |
27+
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
28+
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
29+
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
30+
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
31+
32+
33+
[2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
34+
[2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
35+
[2025/07/01 14:44:47] [ info] [simd ] disabled
36+
[2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
37+
[2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
38+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
39+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
40+
[2025/07/01 14:44:47] [ info] [sp] stream processor started
41+
[2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
42+
[2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
43+
[0] memory: [[1751381087.225589224, {}], {"Mem.total"=>3986708, "Mem.used"=>560708, "Mem.free"=>3426000, "Swap.total"=>0, "Swap.used"=>0, "Swap.free"=>0}]
44+
[0] memory: [[1751381088.228411537, {}], {"Mem.total"=>3986708, "Mem.used"=>560708, "Mem.free"=>3426000, "Swap.total"=>0, "Swap.used"=>0, "Swap.free"=>0}]
45+
[0] memory: [[1751381089.225600084, {}], {"Mem.total"=>3986708, "Mem.used"=>561480, "Mem.free"=>3425228, "Swap.total"=>0, "Swap.used"=>0, "Swap.free"=>0}]
46+
[0] memory: [[1751381090.228345064, {}], {"Mem.total"=>3986708, "Mem.used"=>561480, "Mem.free"=>3425228, "Swap.total"=>0, "Swap.used"=>0, "Swap.free"=>0}]
3147
```
3248

3349
## Threading
@@ -37,34 +53,34 @@ You can enable the `threaded` setting to run this input in its own
3753

3854
### Configuration file
3955

40-
In your main configuration file append the following `Input` and `Output` sections:
56+
In your main configuration file append the following:
4157

4258
{% tabs %}
43-
{% tab title="fluent-bit.conf" %}
44-
45-
```python
46-
[INPUT]
47-
Name mem
48-
Tag memory
49-
50-
[OUTPUT]
51-
Name stdout
52-
Match *
53-
```
54-
55-
{% endtab %}
56-
5759
{% tab title="fluent-bit.yaml" %}
5860

5961
```yaml
6062
pipeline:
6163
inputs:
6264
- name: mem
6365
tag: memory
66+
6467
outputs:
6568
- name: stdout
6669
match: '*'
6770
```
6871
6972
{% endtab %}
70-
{% endtabs %}
73+
{% tab title="fluent-bit.conf" %}
74+
75+
```text
76+
[INPUT]
77+
Name mem
78+
Tag memory
79+
80+
[OUTPUT]
81+
Name stdout
82+
Match *
83+
```
84+
85+
{% endtab %}
86+
{% endtabs %}

0 commit comments

Comments
 (0)