You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sources/reference/components/prometheus/prometheus.exporter.process.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,14 +36,16 @@ You can use the following arguments with `prometheus.exporter.process`:
36
36
|`track_children`|`bool`| Whether to track a process' children. |`true`| no |
37
37
|`track_threads`|`bool`| Report metrics for a process' individual threads. |`true`| no |
38
38
39
-
If `remove_empty_groups` is `true`, the process "groups" created by the `matcher` blocks continue to report metrics until {{< param "PRODUCT_NAME" >}} is restarted.
40
-
This can cause unbounded growth in metrics being reported and resources consumed by {{< param "PRODUCT_NAME" >}} if the `matcher` blocks' `name` arguments define group names that
41
-
may be different for new process instances.
42
-
This is the default behavior for backwards compatibility, but we recommend that you set `remove_empty_groups` to `false`.
43
-
44
-
For example, when `remove_empty_groups` is `true` and the `name` argument for a `matcher` block utilizes the `.PID` of
45
-
a process, the `matcher` creates a new process group when a new instance of a process in that `matcher` block is identified.
46
-
The previous group continues to report metrics even though no running processes are associated with that group.
39
+
If you set `remove_empty_groups` to the default, `false`, the process "groups" created by the `matcher` blocks continue to report metrics even after the processes in that group have stopped running.
40
+
This ensures you can see when a process count drops to zero, but it can cause unbounded growth in reported metrics and memory usage if your `matcher` generates dynamic group names, for example, using specific PIDs.
41
+
The reporting continues until {{< param "PRODUCT_NAME" >}} is restarted.
42
+
43
+
When you set `remove_empty_groups` to `true`, process groups are forgotten and stop reporting metrics as soon as they contain no running processes.
44
+
Grafana recommends that you set `remove_empty_groups` to `true` if your name argument utilizes unique identifiers like `.PID` or `.StartTime`.
45
+
46
+
For example, when you set `remove_empty_groups` to `false` and the `name` argument for a `matcher` block utilizes the `.PID` of a process, the `matcher` creates a new process group for every new process instance.
47
+
The old process groups continue to report metrics with values of 0, even though no running processes are associated with them, leading to high cardinality.
48
+
Set `remove_empty_groups` to `true` to remove the old groups, and prevent the high cardinality.
0 commit comments