-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Open
Description
What did you do?
I have an alert that count_over_time
a summed rate, similiar to the following rule.
As soon as I add the > 1*1.25
operation the query fails with loading too many samples.
Would it be possible to add --query.max-samples parameter to promtool?
tests:
- promql_expr_test:
- expr: count_over_time((rate(container_cpu_usage_seconds_total[1m]) > 1 * 1.25)[30d:1m]) > 30
eval_time: 35m
interval: 15s
input_series:
- series: 'container_cpu_usage_seconds_total
values: "0+30x240 0+15x240"
What did you expect to see?
The unit test should finish and show results.
What did you see instead? Under which circumstances?
I see a query processing would load too many samples into memory in query
error, when executing the above unit test.
FAILED:
expr: "count_over_time((rate(container_cpu_usage_seconds_total[1m]) > 1 * 1.25)[30d:1m]) > 30", time: 35m, err: query processing would load too many samples into memory in query exe
System information
Linux 6.14.0-32-generic x86_64 (actually running prometheus/prometheus docker container)
Prometheus version
Container Image Version:
prom/prometheus:v3.5.0@sha256:63805ebb8d2b3920190daf1cb14a60871b16fd38bed42b857a3182bc621f4996
Prometheus configuration file
tests:
- promql_expr_test:
- expr: count_over_time((rate(container_cpu_usage_seconds_total[1m]) > 1 * 1.25)[30d:1m]) > 30
eval_time: 35m
interval: 15s
input_series:
- series: 'container_cpu_usage_seconds_total
values: "0+30x240 0+15x240"
Alertmanager version
Alertmanager configuration file
Logs
FAILED:
expr: "count_over_time((rate(container_cpu_usage_seconds_total[1m]) > 1 * 1.25)[30d:1m]) > 30", time: 35m, err: query processing would load too many samples into memory in query exe