mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-08-20 18:33:52 -07:00
Fix mount points being collected multiple times in filesystem_linux
Signed-off-by: Markus Sütter <markus.suetter@secunet.com>
This commit is contained in:
parent
b57f5bab2d
commit
83efcfe404
|
@ -132,6 +132,11 @@ func (c *filesystemCollector) processStat(labels filesystemLabels) filesystemSta
|
||||||
}
|
}
|
||||||
stuckMountsMtx.Unlock()
|
stuckMountsMtx.Unlock()
|
||||||
|
|
||||||
|
// Remove options from labels because options will not be used from this point forward
|
||||||
|
// and keeping them can lead to errors when the same device is mounted to the same mountpoint
|
||||||
|
// twice, with different options (metrics would be recorded multiple times).
|
||||||
|
labels.options = ""
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
labels.deviceError = err.Error()
|
labels.deviceError = err.Error()
|
||||||
c.logger.Debug("Error on statfs() system call", "rootfs", rootfsFilePath(labels.mountPoint), "err", err)
|
c.logger.Debug("Error on statfs() system call", "rootfs", rootfsFilePath(labels.mountPoint), "err", err)
|
||||||
|
|
Loading…
Reference in a new issue