Fix conversion of unsigned ints in prometheus output (#3978)

(cherry picked from commit 7177e0473f)
This commit is contained in:
Daniel Nelson
2018-04-05 16:38:41 -07:00
committed by Daniel Nelson
parent 3c039921e1
commit 38075d8ff8
2 changed files with 26 additions and 0 deletions

View File

@@ -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: