| 1 | <!--startmeta |
| 2 | custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/diskspace.plugin/README.md" |
| 3 | meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/diskspace.plugin/metadata.yaml" |
| 4 | sidebar_label: "Disk space" |
| 5 | learn_status: "Published" |
| 6 | learn_rel_path: "Collecting Metrics/Collectors/Storage and Filesystems" |
| 7 | keywords: ['disk', 'I/O', 'space', 'inode'] |
| 8 | message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" |
| 9 | endmeta--> |
| 10 | |
| 11 | # Disk space |
| 12 | |
| 13 | |
| 14 | <img src="https://netdata.cloud/img/hard-drive.svg" width="150"/> |
| 15 | |
| 16 | |
| 17 | Plugin: diskspace.plugin |
| 18 | Module: diskspace.plugin |
| 19 | |
| 20 | <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> |
| 21 | |
| 22 | ## Overview |
| 23 | |
| 24 | Monitor Disk space metrics for proficient storage management. Keep track of usage, free space, and error rates to prevent disk space issues. |
| 25 | |
| 26 | |
| 27 | |
| 28 | This collector is supported on all platforms. |
| 29 | |
| 30 | This collector supports collecting metrics from multiple instances of this integration, including remote instances. |
| 31 | |
| 32 | |
| 33 | Disk space can be monitored further using the following other integrations: |
| 34 | |
| 35 | - [eBPF Disk](/src/collectors/ebpf.plugin/integrations/ebpf_disk.md) |
| 36 | |
| 37 | ### Default Behavior |
| 38 | |
| 39 | #### Auto-Detection |
| 40 | |
| 41 | The plugin reads data from `/proc/self/mountinfo` and `/proc/diskstats file`. |
| 42 | |
| 43 | #### Limits |
| 44 | |
| 45 | The default configuration for this integration does not impose any limits on data collection. |
| 46 | |
| 47 | #### Performance Impact |
| 48 | |
| 49 | The default configuration for this integration is not expected to impose a significant performance impact on the system. |
| 50 | |
| 51 | ## Setup |
| 52 | |
| 53 | |
| 54 | ### Prerequisites |
| 55 | |
| 56 | No action required. |
| 57 | |
| 58 | ### Configuration |
| 59 | |
| 60 | #### Options |
| 61 | |
| 62 | You can also specify per mount point `[plugin:proc:diskspace:mountpoint]` |
| 63 | |
| 64 | <details open><summary>Config options</summary> |
| 65 | |
| 66 | |
| 67 | |
| 68 | | Option | Description | Default | Required | |
| 69 | |:-----|:------------|:--------|:---------:| |
| 70 | | update every | Data collection frequency. | 1 | no | |
| 71 | | remove charts of unmounted disks | Remove chart when a device is unmounted on host. | yes | no | |
| 72 | | check for new mount points every | Parse proc files frequency. | 15s | no | |
| 73 | | exclude space metrics on paths | Do not show metrics (charts) for listed paths. This option accepts netdata simple pattern. | /proc/* /sys/* /var/run/user/* /run/user/* /snap/* /var/lib/docker/* | no | |
| 74 | | exclude space metrics on filesystems | Do not show metrics (charts) for listed filesystems. This option accepts netdata simple pattern. | *gvfs *gluster* *s3fs *ipfs *davfs2 *httpfs *sshfs *gdfs *moosefs fusectl autofs | no | |
| 75 | | exclude inode metrics on filesystems | Do not show metrics (charts) for listed filesystems. This option accepts netdata simple pattern. | msdosfs msdos vfat overlayfs aufs* *unionfs | no | |
| 76 | | space usage for all disks | Define if plugin will show metrics for space usage. When value is set to `auto` plugin will try to access information to display if filesystem or path was not discarded with previous option. | auto | no | |
| 77 | | inodes usage for all disks | Define if plugin will show metrics for inode usage. When value is set to `auto` plugin will try to access information to display if filesystem or path was not discarded with previous option. | auto | no | |
| 78 | |
| 79 | |
| 80 | </details> |
| 81 | |
| 82 | |
| 83 | |
| 84 | #### via File |
| 85 | |
| 86 | The configuration file name for this integration is `netdata.conf`. |
| 87 | Configuration for this specific integration is located in the `[plugin:proc:diskspace]` section within that file. |
| 88 | |
| 89 | The file format is a modified INI syntax. The general structure is: |
| 90 | |
| 91 | ```ini |
| 92 | [section1] |
| 93 | option1 = some value |
| 94 | option2 = some other value |
| 95 | |
| 96 | [section2] |
| 97 | option3 = some third value |
| 98 | ``` |
| 99 | You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the |
| 100 | Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory). |
| 101 | |
| 102 | ```bash |
| 103 | cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata |
| 104 | sudo ./edit-config netdata.conf |
| 105 | ``` |
| 106 | |
| 107 | ##### Examples |
| 108 | There are no configuration examples. |
| 109 | |
| 110 | |
| 111 | |
| 112 | ## Alerts |
| 113 | |
| 114 | |
| 115 | The following alerts are available: |
| 116 | |
| 117 | | Alert name | On metric | Description | |
| 118 | |:------------|:----------|:------------| |
| 119 | | [ disk_space_usage ](https://github.com/netdata/netdata/blob/master/src/health/health.d/disks.conf) | disk.space | disk ${label:mount_point} space utilization | |
| 120 | | [ disk_inode_usage ](https://github.com/netdata/netdata/blob/master/src/health/health.d/disks.conf) | disk.inodes | disk ${label:mount_point} inode utilization | |
| 121 | |
| 122 | |
| 123 | ## Metrics |
| 124 | |
| 125 | Metrics grouped by *scope*. |
| 126 | |
| 127 | The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. |
| 128 | |
| 129 | |
| 130 | |
| 131 | ### Per mount point |
| 132 | |
| 133 | |
| 134 | |
| 135 | Labels: |
| 136 | |
| 137 | | Label | Description | |
| 138 | |:-----------|:----------------| |
| 139 | | mount_point | Path used to mount a filesystem | |
| 140 | | filesystem | The filesystem used to format a partition. | |
| 141 | | mount_root | Root directory where mount points are present. | |
| 142 | |
| 143 | Metrics: |
| 144 | |
| 145 | | Metric | Dimensions | Unit | |
| 146 | |:------|:----------|:----| |
| 147 | | disk.space | avail, used, reserved_for_root | GiB | |
| 148 | | disk.inodes | avail, used, reserved_for_root | inodes | |
| 149 | |
| 150 |