I've been looking into Prometheus and Grafana for the the past couple of days and have some trouble wrapping my head around how it works exactly.
What I have at the moment is a counter which increases over time (i.e. the counter can go only up). I am trying to do a linear graph to show how this value increases over specified time range.
For this I am using the following query:
sum(increase(my_metric[$__range]))
I have also set up the type to both to show Range and Instant in the query options.
What I don't understand is that if I set a large range (i.e. from the moment I was taking this metric, which in this case is 4 months) the graph looks fine to me:
However, if I set a short time range (i.e. 24 hours) the line fluctuates:
So my question is do I have the right approach for what I am trying to do?
Also why does the short time-range fluctuates when the counter goes only up?
My assumption is that the increase()
function does some estimates which result in that line. But in this case does it mean that anyway the "Instant" value (green dot), which is 24 means that in that period of time the counter increased by 24?