vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

count type & hitcount(...) #96

Closed igreg closed 10 years ago

igreg commented 10 years ago

Hi!

I have just started to play with graph-explorer so apologies if I sound a bit confusing, I haven't a deep knowledge of graphite functions and how graph-explorer uses them.

My problem is, I hope pretty simple. Here is what I have.

I have a metric which is incremented by 1 each time an event occurs which makes it, I guess, a metric of with a target type count. I am facing an issue however to display the correct number of hitcounts over a given period of time. I seem to need to use the Graphite transformation function hitcounts to display this correctly but I cannot find or understand how I could use graph-explorer to do it. All I have is avg over X where I think I'd need sum over X.

Greg

Dieterbe commented 10 years ago

if your current unit is foo, then try requesting something like unit=foo/h and it will give you the foo's per hour. all possible time units are here https://github.com/vimeo/graph-explorer/wiki/Units-&-Prefixes

if for some reason your data is already a rate per second (maybe because it got aggregated by statsd) than it should work the same way, but the original unit would be unit/s. this operation would be equivalent to hitcount.

igreg commented 10 years ago

Hi Dieter!

Thanks for your reply. Helped me understand how graph-explorer aggregates data a little bit better. Your suggestion doesn't appear to be working however but I'm not sure why.

The unit of the metric in my case is order so tried to use order/h but it then it goes from a graph where all the values where positive (which make sense since it is a count) to a graph with a mix of positive and negative values. On the left side of the graph though, it shows order/h/60 ( count ).

Shouldn't it say order/3600 ( count )? Also, would it be possible to use order/15m as a unit?

Dieterbe commented 10 years ago

order/h/60 ( count ) looks like a bug

also i was mistaken. You have to make sure target_type=counter, not count (see https://github.com/vimeo/graph-explorer/wiki/Consistent-tag-keys-and-values#wiki-values-to-use)

that will actually tell GE to derive by default i.e if you just query with patterns that will match the metric but if you don't request an explicit unit conversion, it should give you order/s, although you could still ask for order/m or order/h, but not order/15m

Dieterbe commented 10 years ago

actually the order/h/60 ( count ) could be normal. i'm going to close this because i explained how to do it in march and haven't heard back.