Graphing slow counters with prometheus and grafana
<p>We graph fast counters with <code>sum(rate(my_counter_total[1m]))</code> or with <code>sum(irate(my_counter_total[20s]))</code>. Where the second one is preferrable if you can always expect changes within the last couple of seconds.</p>

<p>But how do you graph slow counters where you only have some increments every couple of minutes or even hours? Having values like 0.0013232/s is not very human friendly.</p>

<p>Let's say I want to graph how many users sign up to our service (we expect a couple of signups per hour). What's a reasonable query?</p>

<p>We currently use the following to graph that in grafana:</p>

<ul>
<li>Query: <code>3600 * sum(rate(signup_total[1h]))</code></li>
<li>Step: 3600s</li>
<li>Resolution: 1/1</li>
</ul>

<p><a href="https://i.stack.imgur.com/NaDIG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NaDIG.png" alt="Slow counter setup"></a></p>

<p>Is this reasonable?</p>

<p>I'm still trying to understand how all those parameters play together to draw a graph. Can someone explain how the range selector (<code>[10m]</code>), the <code>rate()</code> and the <code>irate()</code> functions, the <code>Step</code> and <code>Resolution</code> settings in grafana influence each other?</p>