Nagios/Icinga check for LVM thin pools
Find a file
2023-06-14 08:19:18 +02:00
.gitignore Initial implementation 2023-06-14 08:19:18 +02:00
check_lvm_thinpools Initial implementation 2023-06-14 08:19:18 +02:00
check_lvm_thinpools-sudoers.d Initial implementation 2023-06-14 08:19:18 +02:00
LICENSE Initial implementation 2023-06-14 08:19:18 +02:00
poetry.lock Initial implementation 2023-06-14 08:19:18 +02:00
pyproject.toml Initial implementation 2023-06-14 08:19:18 +02:00
README.md Initial implementation 2023-06-14 08:19:18 +02:00

check_lvm_thinpools

This is a re-implementation of the Perl check_lvm_thinpools. That is used to check the free capacity in Linux Logical Volume Manager (LVM) thin pools.

The check uses the nagiosplugin framework to output metrics. Multiple thin pools are supported too.

$ ./check_lvm_thinpools
LVMTHINPOOLS OK - data percent (workhero_nvme/nvmepool) is 61.78% | 'data_workhero_nvme/nvmepool'=61.78%;70;90;0;100 'meta_workhero_nvme/nvmepool'=34.21%;70;90;0;100 data_percent=61.78%;70;90;0;100 metadata_percent=34.21%;70;90;0;100

Supported command line arguments can be listed with the --help command line argument.

$ ./check_lvm_thinpools --help
usage: check_lvm_thinpools [-h] [--dpw RANGE] [--dpc RANGE] [--mpw RANGE] [--mpc RANGE] [-v]

options:
  -h, --help            show this help message and exit
  --dpw RANGE, --data-warning-percent RANGE
  --dpc RANGE, --data-critical-percent RANGE
  --mpw RANGE, --metadata-warning-percent RANGE
  --mpc RANGE, --metadata-critical-percent RANGE
  -v, --verbose         increase output verbosity (use up to 3 times)

The user that runs the check must be allowed to execute /sbin/lvs via sudo.