go-graphite / carbonapi

Implementation of graphite API (graphite-web) in golang
Other
308 stars 140 forks source link

averageAbove(0) not working #488

Open mzealey opened 4 years ago

mzealey commented 4 years ago

I have a number of places where I want to strip out series that just have 0's in them and use | aboveAverage(0) which should be a > 0 filter. This works fine in graphite-web but it does not strip any series out in carbonapi. Setting to 0.0001 strips them out.

A second bug with this is that when no series are present due to this stripping, graphite-web just returns empty data, however carbonapi returns a 404 which then shows up on grafana as an error.

Using 0.13 centos 8 rpm.

mzealey commented 4 years ago

Ah i see I can fix that 2nd issue with the notFoundStatusCode param.

Civil commented 4 years ago

I can't reproduce that behavior (however I'm testing it on current master, but it should have any changes in behavior around averageAbove)

Could you please share datapoints for the series that is affected?