diff --git a/accumulator.go b/accumulator.go index f7fb7c1e4..d1f8adf61 100644 --- a/accumulator.go +++ b/accumulator.go @@ -134,6 +134,16 @@ func (bp *BatchPoints) AddFields( bp.Lock() defer bp.Unlock() + // InfluxDB does not support writing uint64 + for k, v := range fields { + switch val := v.(type) { + case uint64: + if val < uint64(9223372036854775808) { + fields[k] = int64(val) + } + } + } + measurement = bp.Prefix + measurement if bp.Config != nil {