summaryrefslogtreecommitdiffstats
path: root/collectors/diskspace.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-08-04 08:57:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-08-04 08:57:13 +0000
commitcbf70980c060bde02906a8e9de2064459bacc93c (patch)
tree5b9ade02e0ed32a4b33f5e8647092d0c02ea586d /collectors/diskspace.plugin
parentReleasing debian version 1.16.0-1. (diff)
downloadnetdata-cbf70980c060bde02906a8e9de2064459bacc93c.tar.xz
netdata-cbf70980c060bde02906a8e9de2064459bacc93c.zip
Merging upstream version 1.16.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/diskspace.plugin')
-rw-r--r--collectors/diskspace.plugin/README.md4
-rw-r--r--collectors/diskspace.plugin/plugin_diskspace.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/collectors/diskspace.plugin/README.md b/collectors/diskspace.plugin/README.md
index 8f859e350..ff98a8744 100644
--- a/collectors/diskspace.plugin/README.md
+++ b/collectors/diskspace.plugin/README.md
@@ -1,6 +1,6 @@
# diskspace.plugin
-This plugin monitors the disk space usage of mounted disks, under Linux.
+This plugin monitors the disk space usage of mounted disks, under Linux. The plugin requires Netdata to have execute/search permissions on the mount point itself, as well as each component of the absolute path to the mount point.
Two charts are available for every mount:
- Disk Space Usage
@@ -10,7 +10,7 @@ Two charts are available for every mount:
Simple patterns can be used to exclude mounts from showed statistics based on path or filesystem. By default read-only mounts are not displayed. To display them `yes` should be set for a chart instead of `auto`.
-By default, Netdata will enable monitoring metrics only when they are not zero. If they are constantly zero they are ignored. Metrics that will start having values, after netdata is started, will be detected and charts will be automatically added to the dashboard (a refresh of the dashboard is needed for them to appear though). Set `yes` for a chart instead of `auto` to enable it permanently.
+By default, Netdata will enable monitoring metrics only when they are not zero. If they are constantly zero they are ignored. Metrics that will start having values, after netdata is started, will be detected and charts will be automatically added to the dashboard (a refresh of the dashboard is needed for them to appear though). Set `yes` for a chart instead of `auto` to enable it permanently. You can also set the `enable zero metrics` option to `yes` in the `[global]` section which enables charts with zero metrics for all internal Netdata plugins.
```
diff --git a/collectors/diskspace.plugin/plugin_diskspace.c b/collectors/diskspace.plugin/plugin_diskspace.c
index 77b87b093..eab607d84 100644
--- a/collectors/diskspace.plugin/plugin_diskspace.c
+++ b/collectors/diskspace.plugin/plugin_diskspace.c
@@ -249,7 +249,9 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) {
int rendered = 0;
- if(m->do_space == CONFIG_BOOLEAN_YES || (m->do_space == CONFIG_BOOLEAN_AUTO && (bavail || breserved_root || bused))) {
+ if(m->do_space == CONFIG_BOOLEAN_YES || (m->do_space == CONFIG_BOOLEAN_AUTO &&
+ (bavail || breserved_root || bused ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if(unlikely(!m->st_space)) {
m->do_space = CONFIG_BOOLEAN_YES;
m->st_space = rrdset_find_bytype_localhost("disk_space", disk);
@@ -289,7 +291,9 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) {
// --------------------------------------------------------------------------
- if(m->do_inodes == CONFIG_BOOLEAN_YES || (m->do_inodes == CONFIG_BOOLEAN_AUTO && (favail || freserved_root || fused))) {
+ if(m->do_inodes == CONFIG_BOOLEAN_YES || (m->do_inodes == CONFIG_BOOLEAN_AUTO &&
+ (favail || freserved_root || fused ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if(unlikely(!m->st_inodes)) {
m->do_inodes = CONFIG_BOOLEAN_YES;
m->st_inodes = rrdset_find_bytype_localhost("disk_inodes", disk);