aboutsummaryrefslogtreecommitdiff
path: root/collector/filesystem_linux.go
Commit message (Collapse)AuthorAge
* Use Go 1.13 error featuresBen Kochie2020-06-16
| | | | | | | * Use `errors.Is()` for unwrapping errors. * Use `%w` error verb in internal error formatting. Signed-off-by: Ben Kochie <superq@gmail.com>
* switch to go-kit/log (#1575)Ben Ye2019-12-31
| | | Signed-off-by: yeya24 <yb532204897@gmail.com>
* Add a flag to adjust mount timeoutMark Knapp2019-10-22
| | | | Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
* properly strip path.rootfs from mountpoint labels (#1421)dt-rush2019-07-19
| | | | | Change-type: patch Connects-to: #1418 Signed-off-by: dt-rush <nickp@balena.io>
* Ignore iso9600 filesystem on Linux (#1355)Leonid Evdokimov2019-06-18
| | | | | | The filesystem is read-only and is often used for a virtual FS with a configuration file for a virtual machine. Signed-off-by: Leonid Evdokimov <leon@darkk.net.ru>
* use sys/unix package instead of syscall (#1340)Paul Gier2019-05-10
| | | | | | | | According to the golang docs, the syscall package is deprecated. https://golang.org/pkg/syscall This updates collectors to use the x/sys/unix package instead. Also updates the vendored x/sys/unix module to latest. Signed-off-by: Paul Gier <pgier@redhat.com>
* Add fallback for missing /proc/1/mounts (#1172)Ben Kochie2018-11-30
| | | | | | | | | | | | | | | | | | * Add fallback for missing /proc/1/mounts On some systems, `/proc/1/mounts` is hidden from non-root users due to the `hidepid` procfs feature. Attempt to fallback to `/proc/mounts` if `/proc/1/mounts` is not found. Signed-off-by: Ben Kochie <superq@gmail.com> * Add tests. Signed-off-by: Ben Kochie <superq@gmail.com> * Add CHANGELOG entry. Signed-off-by: Ben Kochie <superq@gmail.com>
* Remove unused variable readOnly from filesystem_linux.go. (#1173)Jerome Froelich2018-11-30
| | | | | | The pull request #1002 changed the logic used on Linux servers to determine if a filesystem is read-only. As a result of this change, the variable `readOnly` is now unused and can be removed. Signed-off-by: Jerome Froelich <jeromefroelich@hotmail.com>
* collector: add bounds check and test for filesystem collector (#1133)Matt Layher2018-10-30
| | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* Ignore additional virtual filesystems (#1104)Ben Kochie2018-10-12
| | | | | | | | | Add more virtual filesystems to the default ignore list * bpf * cgroup2 * selinuxfs * squashfs Signed-off-by: Ben Kochie <superq@gmail.com>
* [continue 912] strip rootfs prefix for run in docker (#1058)Yecheng Fu2018-10-04
| | | | | | | | | | | | * strip rootfs prefix for run in docker * Use `/` as default value of path.rootfs, and parse mounts from `/proc/1/mounts`. * No need to mount `/proc` and `/sys` because we share host's PID namespace, which allows processes within the container to see all of the processes on the system. Closes: #66 Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com> Signed-off-by: Yecheng Fu <cofyc.jackson@gmail.com>
* filesystem: Ignore netns/nsfs mounts (#1047)Daniele Sluijters2018-09-26
| | | | | | | | | | | When starting Docker containers a whole bunch of netns (network namespace) mounts are created that the node exporter can't make any sense of (and can't read either). This ignores all nsfs filesystems. Fixes #875 Signed-off-by: Daniele Sluijters <daenney@users.noreply.github.com>
* Exclude only subdirectories of /var/lib/docker (#1003)Johannes Wienke2018-07-23
| | | | | | It is quite common to put /var/lib/docker itself on a separate partition and that should be monitored as well. Signed-off-by: Johannes Wienke <languitar@semipol.de>
* Use /proc/mounts instead of statfs(2) for ro state (#1002)Brandon Gilmore2018-07-16
| | | | | | | | | | While the statfs(2) approach is reliable for normally mounted filesystems, the flags returned can be inconsistent when filesystem has been remounted read-only after encountering an error. The returned flags do accurately represent the internal state of the filesystem, but they do not reflect whether the VFS layer will accept writes. Instead, it makes sense to parse the current VFS mount state from the options field in /proc/mounts since it takes precedence. Signed-off-by: Brandon Gilmore <bgilmore@valvesoftware.com>
* Changed the way that stuck mounts are handled. If a mount fails to return, ↵mknapphrt2018-07-14
| | | | | | | | | | | | | | | it will stop being queried until it returns. (#997) Fixed spelling mistakes. Update transport_generic.go Changed to a mutex approach instead of channels and added a timeout before declaring a mount stuck. Removed unnecessary lock channel and clarified some var names. Fixed style nits. Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
* Adding support for evaluating octal characters in mountpoint (#954)Brad Beam2018-06-06
| | | Signed-off-by: Brad Beam <brad.beam@b-rad.info>
* Add overlay to defIgnoredFSTypes (#824)Kasinath Kottukkal2018-02-16
| | | | | | | | * Add overlay to defIgnoredFSTypes To avoid statfs() errors if node_exporter is running as non privileged user. * Updated defIngoredFSTypes values in sorted order
* Fix log level regression in #533Brian Brazil2018-02-07
|
* Ignore /var/lib/docker by default. (#814)Brian Brazil2018-02-06
| | | | | | | | | | | The node exporter runs unprivileged, so it cannot statfs any filesystems under this directory causing log spam. In addition there tends to be high churn in the filesystems here (as it's basically application monitoring) which can cause high cardinaltiy and in one case caused Prometheus's index symbol table to get very large. Accordingly this should be ignored to reduce log spam and avoid performance issues. The filesystems themselves can in principle be monitored via container oriented exporters, and the underlying filesystems will still be monitored.
* Ignore more virtual filesystems (#775)Ben Kochie2018-01-03
| | | Add additional Linux virtual filesystem types to the default list.
* [FIX] Exclude Linux proc from filesystem type regexp (#774)Netmonk2018-01-03
| | | | | | * [FIX] Issue 63, error on excluding proc filesystem on linux, improving regexp * [FIX] Reordering filter order
* Fix export of stale device error metrics for unmounted filesystemsTobias Schmidt2017-03-22
| | | | | | Instead of maintaining a counter metric for device errors in memory, this change exports a gauge and uses const metrics to avoid leaking metrics for unmounted filesystems.
* Remove unnecessarily named return variablesTobias Schmidt2017-02-28
| | | | | | Named return variables should only be used to describe the returned type further, e.g. `err error` doesn't add any new information and is just stutter.
* Fix all open go lint and vet issuesTobias Schmidt2017-02-28
|
* Make sure we only return one metric per mounted fsJohannes 'fish' Ziemke2017-01-04
|
* Merge pull request #374 from prometheus/fish-add-filesystem-errorsJohannes 'fish' Ziemke2016-12-26
|\ | | | | Add node_filesystem_device_errors_total metric
| * Add node_filesystem_device_errors_total metricJohannes 'fish' Ziemke2016-12-19
| | | | | | | | | | This metric is the total number of errors occurred when getting stats for the given device.
* | Ignore autofs filesystems on linuxBjørn Forsman2016-12-25
|/ | | | | | | | node_exporter currently triggers autofs to mount the underlying filesystem on every scrape. This is undesirable. Better ignore autofs. The underlying filesystem that autofs mounts will be monitored though, when the (real) filesystem is mounted.
* Fix typos, and initialisms from comments in #217Sharif Nassar2016-05-13
|
* Add ignored fs typesDominik Schulz2016-05-13
|
* Fix go format style in filesystem collectorTobias Schmidt2016-01-21
|
* Add filesystem read-only metric node_filesystem_readonlyWill Rouesnel2015-11-12
| | | | | This is a boolean metric which is set to 1 when the filesystem is flagged as read-only.
* collector: sync bsd filesystem collector labels with linuxNick Owens2015-11-02
|
* switch to github.com/prometheus/common/log for loggingNick Owens2015-10-30
|
* Make filesystem collector more robust.Kevin Lyda2015-10-18
| | | | | | Current behaviour throws away all stats on any Statfs error. In practice this is not useful. This turns such errors into debug log messages - though silently ignoring them seems even more valid to me.
* Add license headers to all code files.Matthias Rampke2015-09-26
|
* Add flag to change the location of the procfs.Matthias Rampke2015-09-26
| | | | | | | | | | | | | Remove all hardcoded references to `/proc`. For all collectors that do not use `github.com/prometheus/procfs` yet, provide a wrapper to generate the full paths. Reformulate help strings, errors and comments to remove absolute references to `/proc`. This is a breaking change: the `-collector.ipvs.procfs` flag is removed in favor of the general flag. Since it only affected that collector it was only useful for development, so this should not cause many issues.
* Fix issues from code review, and split common code into filesystem_common.go.Martín Ferrari2015-09-16
|
* Revamp the filesystem collector to use throw-away ConstMetrics.Martín Ferrari2015-09-15
|
* Rename linux collectors for build constraints.Siavash Safi2015-07-14