mirror of
https://github.com/prometheus-community/windows_exporter
synced 2025-04-09 19:11:18 +00:00
Move textfile mtime metric from loop
Loop was erroneously creating duplicate `windows_textfile_mtime_seconds` metrics, causing the exporter to return a HTTP 500 error and no metrics from any collector. Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
parent
4b9b9e97cb
commit
1ba5835af6
@ -313,9 +313,10 @@ fileLoop:
|
|||||||
} else {
|
} else {
|
||||||
for _, mf := range metricFamilies {
|
for _, mf := range metricFamilies {
|
||||||
convertMetricFamily(mf, ch)
|
convertMetricFamily(mf, ch)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
c.exportMTimes(mtimes, ch)
|
c.exportMTimes(mtimes, ch)
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Export if there were errors.
|
// Export if there were errors.
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
Loading…
Reference in New Issue
Block a user