mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-28 23:19:46 -08:00
Merge pull request #143 from lyda/filesystem-81
Make filesystem collector more robust.
This commit is contained in:
commit
2516a5b3c2
|
@ -17,7 +17,6 @@ package collector
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
@ -54,8 +53,9 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
|
||||||
buf := new(syscall.Statfs_t)
|
buf := new(syscall.Statfs_t)
|
||||||
err := syscall.Statfs(mpd.mountPoint, buf)
|
err := syscall.Statfs(mpd.mountPoint, buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Statfs on %s returned %s",
|
log.Debugf("Statfs on %s returned %s",
|
||||||
mpd.mountPoint, err)
|
mpd.mountPoint, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
labelValues := []string{mpd.device, mpd.mountPoint, mpd.fsType}
|
labelValues := []string{mpd.device, mpd.mountPoint, mpd.fsType}
|
||||||
|
|
Loading…
Reference in a new issue