Skip to content

Commit d3bfdea

Browse files
Andrey Mikhaltsovgbrayut
authored andcommitted
cmd/scollector: fix 1816 issue, riak 2.x returns undefined in json instead of zeroes
1 parent bc1b245 commit d3bfdea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/scollector/collectors/riak.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,9 @@ func riak(s string) (opentsdb.MultiDataPoint, error) {
500500
}
501501
for k, v := range r {
502502
if m, ok := riakMeta[k]; ok {
503+
if v == "undefined" {
504+
continue
505+
}
503506
if strings.HasPrefix(m.Metric, "node.latency") {
504507
if nl, ok := v.(float64); ok {
505508
v = nl / 1000000

0 commit comments

Comments
 (0)