Browse Source

fix block nesting bug causing filefd values to never be updated post initial call

pull/191/head
Erkki Eilonen 9 years ago
parent
commit
ff7106615e
  1. 10
      collector/filefd_linux.go

10
collector/filefd_linux.go

@ -59,12 +59,12 @@ func (c *fileFDStatCollector) Update(ch chan<- prometheus.Metric) (err error) {
Help: fmt.Sprintf("File descriptor statistics: %s.", name),
},
)
v, err := strconv.ParseFloat(value, 64)
if err != nil {
return fmt.Errorf("invalid value %s in file-nr: %s", value, err)
}
c.metrics[name].Set(v)
}
v, err := strconv.ParseFloat(value, 64)
if err != nil {
return fmt.Errorf("invalid value %s in file-nr: %s", value, err)
}
c.metrics[name].Set(v)
}
for _, m := range c.metrics {
m.Collect(ch)

Loading…
Cancel
Save