Counter reset and graphite

1,309 views
Skip to first unread message

rockspark

unread,
Nov 18, 2013, 9:31:40 AM11/18/13
to metric...@googlegroups.com
Apologies if this is out of the scope of this project but I'm curious how others have handled this. I've just started experimenting with metrics.

I'm using Counters and reporting to graphite. When the application is restarted, counters are reset to zero. How should I approach accumulating total counts forever? Should I persist the total count in my app and report that to graphite? Similar issue exists with Timer. The count of timer executions will reset to zero on a restart.

Thanks

Matt Brown

unread,
Nov 18, 2013, 9:26:51 PM11/18/13
to metric...@googlegroups.com
I haven't worked with graphite, but in other RRD-based systems (Zenoss) I've set up increasing counters as DERIVE type so that the monitoring system stores the rate of change of the counter rather than reporting the value, and with min=0 so that a negative change is not stored when the value resets to 0 at a restart.

Jilles Oldenbeuving

unread,
Nov 18, 2013, 10:16:34 PM11/18/13
to metric...@googlegroups.com, metric...@googlegroups.com
Rockspark,


Trick is to use nonNegativeDerive in graphite

JO
--
You received this message because you are subscribed to the Google Groups "metrics-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metrics-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

rockspark

unread,
Nov 21, 2013, 2:31:14 PM11/21/13
to metric...@googlegroups.com
Thanks for the tips. What I ended up doing is to reset the counters on every report to graphite. Then use the integral function on the graphite data to get a total count over a given period.

Vinay Pothnis

unread,
Nov 25, 2013, 2:54:42 PM11/25/13
to metric...@googlegroups.com
Hello, 

I have the same issue as well. I would like graphite to maintain the counter value across application server restarts.

While resetting the counter is an approach - I wonder if there are any other ways to "initialize" the metric registry with the previous values. 
It seems like a common problem that everyone would face. 

Thanks
Vinay
Reply all
Reply to author
Forward
0 new messages