Skip to content

Commit 573bfe9

Browse files
authored
Merge pull request #27921 from pneedle-rh/limiting-scrape-samples-update
Updating the limiting scrape samples section
2 parents eeeca0b + 06bf25d commit 573bfe9

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

modules/monitoring-determining-why-prometheus-is-consuming-disk-space.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
[id="determining-why-prometheus-is-consuming-disk-space_{context}"]
77
= Determining why Prometheus is consuming a lot of disk space
88

9-
Labels are used to define attributes for metrics in the form of key-value pairs. A unique time series is created for every key-value pair. Adding many values to labels can result in an exponential increase in the number of time series created. This can impact Prometheus performance and can consume a lot of disk space.
9+
Developers can create labels to define attributes for metrics in the form of key-value pairs. The number of potential key-value pairs corresponds to the number of possible values for an attribute. An attribute that has an unlimited number of potential values is called an unbound attribute. For example, a `customer_id` attribute is unbound because it has an infinite number of possible values.
1010

11-
When Prometheus consumes a lot of disk:
11+
Every assigned key-value pair has a unique time series. The use of many unbound attributes in labels can result in an exponential increase in the number of time series created. This can impact Prometheus performance and can consume a lot of disk space.
1212

13-
* You can *check the number of scrape samples* that are being collected
14-
* You can *reduce the number of unique time series that are created* by reducing the number of unbound attributes that are assigned to user-defined metrics
13+
You can use the following measures when Prometheus consumes a lot of disk:
14+
15+
* *Check the number of scrape samples* that are being collected.
16+
* *Reduce the number of unique time series that are created* by reducing the number of unbound attributes that are assigned to user-defined metrics.
1517
+
1618
[NOTE]
1719
====
18-
Unbound attributes are those that can contain any possible value. Using attributes that are bound to a limited set of possible values reduces the number of potential key-value pair combinations.
20+
Using attributes that are bound to a limited set of possible values reduces the number of potential key-value pair combinations.
1921
====
2022
+
21-
* Cluster administrators can *enforce limits on the number of samples that can be scraped* across user-defined projects
23+
* *Enforce limits on the number of samples that can be scraped* across user-defined projects. This requires cluster administrator privileges.
2224

2325
.Prerequisites
2426

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
// Module included in the following assemblies:
22
//
3-
// * monitoring/enabling-monitoring-for-user-defined-projects.adoc
3+
// * monitoring/configuring-the-monitoring-stack.adoc
44

5-
[id="limiting-scrape-samples-in-user-defined-projects_{context}"]
6-
= Limiting scrape samples in user-defined projects
5+
[id="controlling-the-impact-of-unbound-attributes-in-user-defined-projects_{context}"]
6+
= Controlling the impact of unbound metrics attributes in user-defined projects
77

8-
Labels are used to define attributes for metrics in the form of key-value pairs. A unique time series is created for every key-value pair. Adding many values to labels can result in an exponential increase in the number of time series created. This can impact Prometheus performance and can consume a lot of disk space.
8+
Developers can create labels to define attributes for metrics in the form of key-value pairs. The number of potential key-value pairs corresponds to the number of possible values for an attribute. An attribute that has an unlimited number of potential values is called an unbound attribute. For example, a `customer_id` attribute is unbound because it has an infinite number of possible values.
99

10-
You can prevent this by limiting the number of samples that can be accepted per target scrape in user-defined projects. You should also create alerts that fire when the target cannot be scraped or when a scrape sample threshold is reached.
10+
Every assigned key-value pair has a unique time series. The use of many unbound attributes in labels can result in an exponential increase in the number of time series created. This can impact Prometheus performance and can consume a lot of disk space.
11+
12+
Cluster administrators can use the following measures to control the impact of unbound metrics attributes in user-defined projects:
13+
14+
* *Limit the number of samples that can be accepted* per target scrape in user-defined projects
15+
* *Create alerts* that fire when a scrape sample threshold is reached or when the target cannot be scraped
1116

1217
[NOTE]
1318
====
14-
Limiting scrape samples can help prevent the issues caused by adding many unbound attributes to labels. However, you should also prevent the underlying cause by limiting the number of unbound attributes that you define for your metrics. Unbound attributes are those that can contain any possible value. Using attributes that are bound to a limited set of possible values reduces the number of potential key-value pair combinations.
19+
Limiting scrape samples can help prevent the issues caused by adding many unbound attributes to labels. Developers can also prevent the underlying cause by limiting the number of unbound attributes that they define for metrics. Using attributes that are bound to a limited set of possible values reduces the number of potential key-value pair combinations.
1520
====

0 commit comments

Comments
 (0)