When monitoring volumes with very different sizes using usage it might be desirable to have the option to configure different thresholds independently of the size of the volumes. The easiest way of doing this would be to set different percentages for small, medium and large volumes.
- …that for volumes smaller than 500GiB we want to be warned if the usage exceeds 80%
- …that for volumes between 500GiB and 10TiB we want to be warned if the usage exceeds 90%
- and that for volumes larger than 10TiB we want to trigger warnings for a usage higher than 95%
In order to implement such strategies we are extending the switch --check_only so that a range for the size of the volumes (size_total) can be configured. The strategy described above could then be translated as such:
--check_only=..500GiB -w 80 # Volumes up to 500 GiB, warning after 80% --check_only=500GiB..10TiB -w 90 # Volumes from 0,5 to 10 TiB, warning after 90% --check_only=10TiB.. -w 95 # Volumes above 10 TiB, warning after 95%
The lower limit is included whereas the upper limit is excluded from a given range so that there are not overlaps. This means that in the example above, a volume with exactly 500GiB (i.e. 536870912000 bytes) would fall into the second range and would trigger a warning for a usage higher than 90%.