I have a query to get used memory in Prometheus as a 0.0-1.0 percent. I can alert on this directly but don't want alerts on a short burst, only a high level over time or an average over time exceeding the limit.
I was hoping to do this in the query, but if AlertManger can do it that is acceptable, I just can't find how.
The query
(node_memory_MemTotal - node_memory_MemFree - node_memory_Buffers - node_memory_Cached) / node_memory_MemTotal
The question
How can I take the average over i minutes of that query result?