Ignore NaN values in collection.
We'll re-enable it when we have a better way in UI to handle these.
This commit is contained in:
parent
ac85d8f8f6
commit
374e36d38e
@ -17,6 +17,7 @@ package collector
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -153,6 +154,9 @@ func (collector *PrometheusCollector) Collect(metrics map[string][]v1.MetricVal)
|
||||
if err != nil {
|
||||
errorSlice = append(errorSlice, err)
|
||||
}
|
||||
if math.IsNaN(metVal) {
|
||||
metVal = 0
|
||||
}
|
||||
|
||||
metric := v1.MetricVal{
|
||||
Label: metLabel,
|
||||
|
Loading…
Reference in New Issue
Block a user