Which PromQL statement returns the sum of all values of the metric node_memory_MemAvailable_bytes from 10 minutes ago?
In PromQL, the offset modifier allows you to query metrics as they were at a past time relative to the current evaluation. To retrieve the value of node_memory_MemAvailable_bytes as it was 10 minutes ago, you place the offset keyword inside the aggregation function's argument, not after it.
The correct query is:
sum(node_memory_MemAvailable_bytes offset 10m)
This computes the total available memory across all instances, based on data from exactly 10 minutes in the past.
Placing offset after the aggregation (as in option B) is syntactically invalid because modifiers apply to instant and range vector selectors, not to complete expressions.
Verified from Prometheus documentation -- PromQL Evaluation Modifiers: offset, Aggregation Operators, and Temporal Query Examples.
Pete
9 hours agoQuentin
5 days agoRanee
28 days agoAfton
1 month agoTora
1 month agoOtis
1 month agoDanilo
2 months agoTeddy
2 months agoCherrie
2 months ago