-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disk thresholds as a fraction of their usage does not scale well with modern disks: on one hand a 90% full partition that store logs is generaly an issue and should be reported, but in the other hand when a huge volume is available for storing backups (e.g. 10TB) the 90% usage limit does not really make sense as we do not want to waste 1TB of disk space. Introduce two new parameters to tune disk usage thresholds: - `--disk-warning-leninency` (default: 500G) - `--disk-critical-leninency` (default: 250G) When the fraction of disk space used reach a warning / critical threshold, check the available space against these "leninency" values, and only report the warning / critical status if the available space is lower than this limit. The defaults values have been chosen to be high enough to have an effect only for disks lager than 5TB. According to IEEE Std 1003.1-2017, a POSIX compliant `df(1)` must support the `-k` flag to return sizes in kB instead of the default that used to be 512-bytes (still in effect by default on FreeBSD but not on Linux). We use this flag on all systems to make sure the output is in 1024-bytes unit regardless of the operating system. Existing unit tests are updated accordingly.
- Loading branch information
Showing
2 changed files
with
61 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters