[ci skip] monitor data for ethernet ports (#45)
* fix import name conflict * adding in ethernet monitor information via prometheus gauge * set CGO_ENABLED env var on build
This commit is contained in:
@@ -31,13 +31,13 @@ func description(prefix, name, helpText string, labelNames []string) *prometheus
|
||||
}
|
||||
|
||||
func splitStringToFloats(metric string) (float64, float64, error) {
|
||||
strings := strings.Split(metric, ",")
|
||||
strs := strings.Split(metric, ",")
|
||||
|
||||
m1, err := strconv.ParseFloat(strings[0], 64)
|
||||
m1, err := strconv.ParseFloat(strs[0], 64)
|
||||
if err != nil {
|
||||
return math.NaN(), math.NaN(), err
|
||||
}
|
||||
m2, err := strconv.ParseFloat(strings[1], 64)
|
||||
m2, err := strconv.ParseFloat(strs[1], 64)
|
||||
if err != nil {
|
||||
return math.NaN(), math.NaN(), err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user