diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2018-10-26 02:45:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-26 02:45:35 +0300 |
commit | 7395d64aed0416b3c470f6b1cbf61e21bf77a508 (patch) | |
tree | 5272327bb4cbb62c5e40c808fbe600f8dc352f43 /collectors/diskspace.plugin | |
parent | 652654c1acab4c748ad54f7ed0e871921dd046e2 (diff) |
diskspace plugin should not stat() excluded mountpoints (#4494)
* diskspace plugin should not stat() excluded mountpoints; fixes #4491
* it should be reversed
Diffstat (limited to 'collectors/diskspace.plugin')
-rw-r--r-- | collectors/diskspace.plugin/plugin_diskspace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/diskspace.plugin/plugin_diskspace.c b/collectors/diskspace.plugin/plugin_diskspace.c index 7cc65ec113..dca7c90769 100644 --- a/collectors/diskspace.plugin/plugin_diskspace.c +++ b/collectors/diskspace.plugin/plugin_diskspace.c @@ -133,7 +133,8 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) { } // check if the mount point is a directory #2407 - { + // but only when it is enabled by default #4491 + if(def_space != CONFIG_BOOLEAN_NO || def_inodes != CONFIG_BOOLEAN_NO) { struct stat bs; if(stat(mi->mount_point, &bs) == -1) { error("DISKSPACE: Cannot stat() mount point '%s' (disk '%s', filesystem '%s', root '%s')." |