Confused with meter and counter in Grafana

1,448 views
Skip to first unread message

Serega Sheypak

unread,
May 1, 2015, 1:09:08 PM5/1/15
to metric...@googlegroups.com
Hi, I'm trying understand how meters and counters work.
I do send counter and meter metrics. 
I increment counter and mark meter each time my servlet is accessed.

What I see on Grafana side confuses me.


Why meter and count show the same?


And the second question:
Why there is zero value for one-minute meter?

Jens

unread,
May 6, 2015, 5:01:51 AM5/6/15
to metric...@googlegroups.com
You have used sum(count) in both series which is the same if you meter.mark() and counter.inc(1) each request. Meter.mark() is the same as calling Meter.mark(1)  which in turn increments the meter.counter property by 1. So if you only use meter.mark() then meter.counter is the count of meter.mark() calls.


 
And the second question:
Why there is zero value for one-minute meter?

No idea, maybe a bug in the reporter you have used?


-- J.

Jens

unread,
May 6, 2015, 5:04:32 AM5/6/15
to metric...@googlegroups.com
 
And the second question:
Why there is zero value for one-minute meter?

No idea, maybe a bug in the reporter you have used?

Or the value is very small and it only looks like zero in the graph? You can try clicking the short yellow line in your graph legend and then choose "right" to move it to the right y-axis which has an independent scale.

-- J. 
Reply all
Reply to author
Forward
0 new messages