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
= Setting scrape intervals, evaluation intervals, and enforced limits for user-defined projects
8
8
9
-
You can limit the number of samples that can be accepted per target scrape in user-defined projects. You can also limit the number of scraped labels, the length of label names, and the length of label values.
9
+
You can set the following scrape and label limits for user-defined projects:
10
+
11
+
* Limit the number of samples that can be accepted per target scrape
12
+
* Limit the number of scraped labels
13
+
* Limit the length of label names and label values
14
+
15
+
You can also set an interval between consecutive scrapes and between Prometheus rule evaluations.
. Add the `enforcedSampleLimit` configuration to `data/config.yaml` to limit the number of samples that can be accepted per target scrape in user-defined projects:
43
+
. Add the enforced limit and time interval configurations to `data/config.yaml`:
38
44
+
39
45
[source,yaml]
40
46
----
@@ -46,31 +52,28 @@ metadata:
46
52
data:
47
53
config.yaml: |
48
54
prometheus:
49
-
enforcedSampleLimit: 50000 <1>
55
+
enforcedSampleLimit: 50000 # <1>
56
+
enforcedLabelLimit: 500 # <2>
57
+
enforcedLabelNameLengthLimit: 50 # <3>
58
+
enforcedLabelValueLengthLimit: 600 # <4>
59
+
scrapeInterval: 1m30s # <5>
60
+
evaluationInterval: 1m15s # <6>
50
61
----
51
62
<1> A value is required if this parameter is specified. This `enforcedSampleLimit` example limits the number of samples that can be accepted per target scrape in user-defined projects to 50,000.
52
-
53
-
. Add the `enforcedLabelLimit`, `enforcedLabelNameLengthLimit`, and `enforcedLabelValueLengthLimit` configurations to `data/config.yaml` to limit the number of scraped labels, the length of label names, and the length of label values in user-defined projects:
54
-
+
55
-
[source,yaml]
56
-
----
57
-
apiVersion: v1
58
-
kind: ConfigMap
59
-
metadata:
60
-
name: user-workload-monitoring-config
61
-
namespace: openshift-user-workload-monitoring
62
-
data:
63
-
config.yaml: |
64
-
prometheus:
65
-
enforcedLabelLimit: 500 <1>
66
-
enforcedLabelNameLengthLimit: 50 <2>
67
-
enforcedLabelValueLengthLimit: 600 <3>
68
-
----
69
-
<1> Specifies the maximum number of labels per scrape.
63
+
<2> Specifies the maximum number of labels per scrape.
70
64
The default value is `0`, which specifies no limit.
71
-
<2> Specifies the maximum length in characters of a label name.
65
+
<3> Specifies the maximum character length for a label name.
72
66
The default value is `0`, which specifies no limit.
73
-
<3> Specifies the maximum length in characters of a label value.
67
+
<4> Specifies the maximum character length for a label value.
74
68
The default value is `0`, which specifies no limit.
69
+
<5> Specifies the interval between consecutive scrapes. The interval must be set between 5 seconds and 5 minutes.
70
+
The default value is `30s`.
71
+
<6> Specifies the interval between Prometheus rule evaluations. The interval must be set between 5 seconds and 5 minutes.
72
+
The default value for Prometheus is `30s`.
73
+
+
74
+
[NOTE]
75
+
====
76
+
You can also configure the `evaluationInterval` property for Thanos Ruler through the `data/config.yaml/thanosRuler` field. The default value for Thanos Ruler is `15s`.
77
+
====
75
78
76
79
. Save the file to apply the changes. The limits are applied automatically.
* See xref:../../nodes/clusters/nodes-cluster-enabling-features.adoc[Enabling features using feature gates] for steps to enable Technology Preview features.
249
249
endif::openshift-dedicated,openshift-rosa[]
250
250
251
-
// Managing scrape sample limits for user-defined projects
251
+
// Managing scrape and evaluation intervals and enforced limits for user-defined projects
* xref:../../observability/monitoring/accessing-third-party-monitoring-apis.adoc#about-accessing-monitoring-web-service-apis_accessing-monitoring-apis-by-using-the-cli[Accessing monitoring APIs by using the CLI]
40
-
* xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#setting-scrape-sample-and-label-limits-for-user-defined-projects_configuring-the-monitoring-stack[Setting a scrape sample limit for user-defined projects]
40
+
* xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#setting-scrape-and-evaluation-intervals-limits-for-user-defined-projects_configuring-the-monitoring-stack[Setting scrape intervals, evaluation intervals, and scrape limits for user-defined projects]
41
41
* xref:../../support/getting-support.adoc#support-submitting-a-case_getting-support[Submitting a support case]
42
42
43
43
// Resolving the KubePersistentVolumeFillingUp alert firing for Prometheus
* See xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#setting-scrape-sample-and-label-limits-for-user-defined-projects_configuring-the-monitoring-stack[Setting a scrape sample limit for user-defined projects] for details on how to set a scrape sample limit and create related alerting rules
34
+
* xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#setting-scrape-and-evaluation-intervals-limits-for-user-defined-projects_configuring-the-monitoring-stack[Setting scrape and evaluation intervals and enforced limits for user-defined projects]
35
35
36
36
// Resolving the KubePersistentVolumeFillingUp alert firing for Prometheus
0 commit comments