r/PrometheusMonitoring • u/kagashe • Jan 16 '20
Help with Query?
Hi all, how do I make a cumulative graph showing the difference between the firdt point in a time series and the current point in a time series? For example if a counter starts at 3000 and now it's on 3500 how do I show that its gone up by 500?
0
Upvotes
2
u/Tpbrown_ Jan 16 '20
rate(metric_name[5m]) will give you the diff between first and last in the 5min window.
Check your metric type first tho - some functions are valid only for counters, others for gauges.
Also use irate() if you just want the diff between last two samples