Open j5k opened 3 months ago
The problem is here: https://github.com/edvler/check_mk-btrfs_health/blob/8cc2449ab15384070af87502af7676e6155d876e/src/local/lib/check_mk/base/plugins/agent_based/btrfs_health.py#L106
btrfs --version
has 2 lines and not only 1 line as output:
btrfs-progs v6.10.1
-EXPERIMENTAL -INJECT -STATIC +LZO +ZSTD +UDEV +FSVERITY +ZONED CRYPTO=libgcrypt
I got this issue too. Fixed it locally with something like:
if (i==0):
btrfs_version = section[i][1]
continue
+ if (i==1 and len(section[i]) > 0 and section[i][0] == '-EXPERIMENTAL'):
+ continue
or
if (i==0):
btrfs_version = line[1]
continue
+ if (i==1 and len(line) > 0 and line[0] == '-EXPERIMENTAL'):
+ continue
but I'm not sure if this is the best way of checking if you get two line output or not...
Error:
Local agent output:
Version: 1.1.3 System: Arch Linux (full updated)