Fix conversion of unsigned ints in prometheus output (#3978)
(cherry picked from commit 7177e0473f)
This commit is contained in:
committed by
Daniel Nelson
parent
3c039921e1
commit
38075d8ff8
@@ -352,6 +352,8 @@ func (p *PrometheusClient) Write(metrics []telegraf.Metric) error {
|
||||
switch fv := fv.(type) {
|
||||
case int64:
|
||||
value = float64(fv)
|
||||
case uint64:
|
||||
value = float64(fv)
|
||||
case float64:
|
||||
value = fv
|
||||
default:
|
||||
@@ -391,6 +393,8 @@ func (p *PrometheusClient) Write(metrics []telegraf.Metric) error {
|
||||
switch fv := fv.(type) {
|
||||
case int64:
|
||||
value = float64(fv)
|
||||
case uint64:
|
||||
value = float64(fv)
|
||||
case float64:
|
||||
value = fv
|
||||
default:
|
||||
@@ -427,6 +431,8 @@ func (p *PrometheusClient) Write(metrics []telegraf.Metric) error {
|
||||
switch fv := fv.(type) {
|
||||
case int64:
|
||||
value = float64(fv)
|
||||
case uint64:
|
||||
value = float64(fv)
|
||||
case float64:
|
||||
value = fv
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user