title: Storing ever-increasing value in Graphite
body: <p>I am monitoring a queue to track the number of error messages over time in Graphite.  The errored messages sit in an end state status of 'error' and thus the simple sending of the count to a gauge or counter does not work as expected.</p>
  
  <p>To illustrate:</p>
  
  <pre><code>minute    path                result
  ---       ----                ------
  1         queue.errors 3000   3000 errors (the baseline)
  2         queue.errors 3002   2 errors 
  3         queue.errors 3005   3 errors
  4         queue.errors 3010   5 errors
  </code></pre>
  
  <p>Is there a way via statsd or graphite to handle this sort of metric?  The queue count of errors will increase forever but the meaningful value is really only the change since the last value.</p>
  
  <p>I've read about statsd's <a href="http://statsd.readthedocs.org/en/latest/types.html#gauge-deltas" rel="nofollow">Gauge Delta</a> which looks to support the opposite of what I need:</p>
  
  <pre><code>statsd.gauge('foo', 70)  # Set the 'foo' gauge to 70.
  statsd.gauge('foo', 1, delta=True)  # Set 'foo' to 71.
  </code></pre>
  
  <p>But, what I really need is this:</p>
  
  <pre><code>statsd.gauge('foo', 70)  # Set the 'foo' gauge to 70.
  statsd.gauge('foo', 71, ?????=True)  # Set 'foo' to 1.
  </code></pre>