Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the "min()" function in PromQL to restrict the values of an instant vector to the maximum value of another instant vector. Here is an example query:

min(instantVector1, max_over_time(instantVector2[5m]))

This query takes the minimum value between the instantVector1 and the maximum value of instantVector2 over the past 5 minutes. In other words, it restricts the values of instantVector1 to be no greater than the maximum value of instantVector2 over the past 5 minutes.