-
Notifications
You must be signed in to change notification settings - Fork 540
in_mem_metrics: initial documentation. #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
4b7e3dd
234a29c
816f19e
c9b624b
978770a
656fbd3
8f2ee91
d4c50a5
1384ad2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,111 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| # Memory metrics | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 3 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| # Configuration parameters | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| | **Key*** | Description | Default | | ||||||||||||||||||||||||||||||||||||||||||||||
| | :------------ | :------------------------------------------------- | :----------- | | ||||||||||||||||||||||||||||||||||||||||||||||
| | `proc_path` | The path of the proc pseudo filesystem. | `/proc` | | ||||||||||||||||||||||||||||||||||||||||||||||
| | `filter_exec` | Filter for a single executable by path. | **inactive** | | ||||||||||||||||||||||||||||||||||||||||||||||
| | `filter_cmd` | Filter by command line. | **inactive** | | ||||||||||||||||||||||||||||||||||||||||||||||
| | `filter_pid` | Filter by comma delimited list of PIDs. | **inactive** | | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 12 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
| | `interval_sec` | Set the interval seconds between events generation. | `5` | | ||||||||||||||||||||||||||||||||||||||||||||||
| | `interval_nsec` | Set the nanoseconds interval (sub seconds). | `0` | | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| The `filter_pid` can include or be set to either `0` or `self` to refer to the fluent-bit process itself. | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 16 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ## Get started | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Command line | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||
| $ fluent-bit -i mem_metrics -o stdout | ||||||||||||||||||||||||||||||||||||||||||||||
| Fluent Bit v2.1.8 | ||||||||||||||||||||||||||||||||||||||||||||||
| * Copyright (C) 2015-2022 The Fluent Bit Authors | ||||||||||||||||||||||||||||||||||||||||||||||
| * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd | ||||||||||||||||||||||||||||||||||||||||||||||
| * https://fluentbit.io | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_rss{pid="4540"} = 21064 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_pss{pid="4540",type="clean"} = 9598 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_pss{pid="4540",type="dirty"} = 5998 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_pss{pid="4540",type="anon"} = 5996 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_pss{pid="4540",type="file"} = 3602 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_pss{pid="4540",type="shmem"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_shared{pid="4540",type="clean"} = 15008 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_shared{pid="4540",type="dirty"} = 4 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_private{pid="4540",type="clean"} = 56 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_private{pid="4540",type="dirty"} = 5996 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_referenced{pid="4540"} = 21064 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_anonymous{pid="4540"} = 5996 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_lazy_free{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_anon_huge_pages{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_shmem_pmd_mapped{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_file_pmd_mapped{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_shared_hugetlb{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_private_hugetlb{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_swap{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_swap_pss{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2023-07-26T14:37:49.919778443Z node_smaps_rollup_locked{pid="4540"} = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Configuration file | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Minimal pipeline for logging memory metrics to the console: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ```ini | ||||||||||||||||||||||||||||||||||||||||||||||
| [INPUT] | ||||||||||||||||||||||||||||||||||||||||||||||
| Name mem_metrics | ||||||||||||||||||||||||||||||||||||||||||||||
| Tag mem | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| [OUTPUT] | ||||||||||||||||||||||||||||||||||||||||||||||
| Name stdout | ||||||||||||||||||||||||||||||||||||||||||||||
| Match mem | ||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Log all instances of Fluent Bit to Prometheus: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ```ini | ||||||||||||||||||||||||||||||||||||||||||||||
| [INPUT] | ||||||||||||||||||||||||||||||||||||||||||||||
| Name mem_metrics | ||||||||||||||||||||||||||||||||||||||||||||||
| Filter_cmd fluent-bit | ||||||||||||||||||||||||||||||||||||||||||||||
| Tag mem | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| [OUTPUT] | ||||||||||||||||||||||||||||||||||||||||||||||
| Name prometheus_remote_write | ||||||||||||||||||||||||||||||||||||||||||||||
| Match mem | ||||||||||||||||||||||||||||||||||||||||||||||
| Host localhost | ||||||||||||||||||||||||||||||||||||||||||||||
| Port 9090 | ||||||||||||||||||||||||||||||||||||||||||||||
| Uri /prometheus/v1/write?prometheus_server=mem | ||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Exposed metrics | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| All metrics are logged as gauges since they can both increase and decrease. Supported gauges are: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_rss | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 88 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_pss | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶
Comment on lines
+88
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint-fix] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
| - type=clean | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - type=dirty | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - type=anon | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - type=file | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - type=shmem | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_shared | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 95 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - type=clean | ||||||||||||||||||||||||||||||||||||||||||||||
| - type=dirty | ||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_private | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 98 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶
Comment on lines
+92
to
+98
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint-fix] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
| - type=dirty | ||||||||||||||||||||||||||||||||||||||||||||||
| - type=clean | ||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_referenced | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 101 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_anonymous | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 102 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_lazy_free | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 103 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_anon_huge_pages | ||||||||||||||||||||||||||||||||||||||||||||||
|
Check warning on line 104 in pipeline/inputs/mem-metrics.md
|
||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_shmem_pmd_mapped | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_file_pmd_mapped | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_shared_hugetlb | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_private_hugetlb | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_swap | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_swap_pss | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶 |
||||||||||||||||||||||||||||||||||||||||||||||
| - node_smaps_rollup_locked | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint] reported by reviewdog 🐶
Comment on lines
+101
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [markdownlint-fix] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Configuration parameters"]