app/vmselect/promql: do not take into account buckets with negative counters in prometheus_buckets

This commit is contained in:
Aliaksandr Valialkin 2019-11-23 14:19:08 +02:00
parent 193d553f6d
commit 414259f47b

View file

@ -362,7 +362,7 @@ func vmrangeBucketsToLE(tss []*timeseries) []*timeseries {
for _, xs := range xss {
ts := xs.ts
v := ts.Values[i]
if !math.IsNaN(v) {
if !math.IsNaN(v) && v > 0 {
count += v
}
ts.Values[i] = count