Skip to content

Commit 4dae327

Browse files
committed
docs: pipeline: inputs: mem-metrics: fix formatting and style issues
- Fix 'Fluent Bit' casing (was 'fluent-bit') in body text - Sort configuration parameters table alphabetically - Fix classic config block indentation from 4 spaces to 2 spaces - Fixed header for config param table Applies to #1170 Signed-off-by: Eric D. Schabell <eric@schabell.org>
1 parent 1384ad2 commit 4dae327

1 file changed

Lines changed: 25 additions & 22 deletions

File tree

pipeline/inputs/mem-metrics.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# Memory metrics
22

3-
The _mem_metrics_, or memory metrics plugin, generates metrics for memory statistics for processes using the `smaps_rollup` file for each process in /proc. This plugin works exclusively on Linux.
3+
The `_mem_metrics_`, or memory metrics plugin, generates metrics for memory statistics for processes using the `smaps_rollup` file for each process in `/proc`. This plugin works exclusively on Linux.
44

5-
# Configuration parameters
5+
## Configuration parameters
66

77
| **Key*** | Description | Default |
88
| :------------ | :------------------------------------------------- | :----------- |
9-
| `proc_path` | The path of the proc pseudo filesystem. | `/proc` |
10-
| `filter_exec` | Filter for a single executable by path. | **inactive** |
119
| `filter_cmd` | Filter by command line. | **inactive** |
12-
| `filter_pid` | Filter by comma delimited list of PIDs. | **inactive** |
13-
| `interval_sec` | Set the interval seconds between events generation. | `5` |
10+
| `filter_exec` | Filter for a single executable by path. | **inactive** |
11+
| `filter_pid` | Filter by comma delimited list of `PIDs`. | **inactive** |
1412
| `interval_nsec` | Set the nanoseconds interval (sub seconds). | `0` |
13+
| `interval_sec` | Set the interval seconds between events generation. | `5` |
14+
| `proc_path` | The path of the proc pseudo filesystem. | `/proc` |
1515

16-
The `filter_pid` can include or be set to either `0` or `self` to refer to the fluent-bit process itself.
16+
The `filter_pid` can include or be set to either `0` or `self` to refer to the Fluent Bit process itself.
1717

1818
## Get started
1919

2020
You can run the plugin from the command line or through a configuration file. By default metrics will be generated for all processes the current user can analyze.
2121

2222
### Command line
2323

24-
```bash
24+
```shell
2525
$ fluent-bit -i mem_metrics -o stdout
2626
Fluent Bit v2.1.8
2727
* Copyright (C) 2015-2022 The Fluent Bit Authors
@@ -55,36 +55,37 @@ Fluent Bit v2.1.8
5555

5656
Minimal pipeline for logging memory metrics to the console:
5757

58-
```ini
58+
```text
5959
[INPUT]
60-
Name mem_metrics
61-
Tag mem
60+
Name mem_metrics
61+
Tag mem
6262
6363
[OUTPUT]
64-
Name stdout
65-
Match mem
64+
Name stdout
65+
Match mem
6666
```
6767

6868
Log all instances of Fluent Bit to Prometheus:
6969

70-
```ini
70+
```text
7171
[INPUT]
72-
Name mem_metrics
73-
Filter_cmd fluent-bit
74-
Tag mem
72+
Name mem_metrics
73+
Filter_cmd fluent-bit
74+
Tag mem
7575
7676
[OUTPUT]
77-
Name prometheus_remote_write
78-
Match mem
79-
Host localhost
80-
Port 9090
81-
Uri /prometheus/v1/write?prometheus_server=mem
77+
Name prometheus_remote_write
78+
Match mem
79+
Host localhost
80+
Port 9090
81+
Uri /prometheus/v1/write?prometheus_server=mem
8282
```
8383

8484
### Exposed metrics
8585

8686
All metrics are logged as gauges since they can both increase and decrease. Supported gauges are:
8787

88+
```text
8889
- node_smaps_rollup_rss
8990
- node_smaps_rollup_pss
9091
- type=clean
@@ -109,3 +110,5 @@ All metrics are logged as gauges since they can both increase and decrease. Supp
109110
- node_smaps_rollup_swap
110111
- node_smaps_rollup_swap_pss
111112
- node_smaps_rollup_locked
113+
```
114+

0 commit comments

Comments
 (0)