Better appPool check
This commit is contained in:
@ -1368,7 +1368,15 @@ class SystemHealthMonitor:
|
||||
try:
|
||||
parts = fs_line.split()
|
||||
if len(parts) >= 6:
|
||||
mountpoint = parts[5] # Get the Path column
|
||||
# Skip pool name entries that start with 'appPool:'
|
||||
if parts[0].startswith('appPool:'):
|
||||
continue
|
||||
|
||||
# Skip mediafs mount entries
|
||||
if '/mnt/pve/mediaf' in parts[0]:
|
||||
continue
|
||||
|
||||
mountpoint = parts[5]
|
||||
|
||||
# Skip excluded mountpoints
|
||||
if any(pattern in mountpoint for pattern in ['/media', '/mnt/pve/mediafs', '/opt/metube_downloads']):
|
||||
@ -1376,9 +1384,11 @@ class SystemHealthMonitor:
|
||||
logger.debug(f"Skipping excluded mountpoint: {mountpoint}")
|
||||
continue
|
||||
|
||||
size_value = self._convert_size_to_bytes(parts[1]) # For total size
|
||||
used_value = self._convert_size_to_bytes(parts[2]) # For used size
|
||||
usage_percent = (used_size / total_size) * 100 if total_size > 0 else 0
|
||||
if parts[1][-1] in 'BKMGT' and parts[2][-1] in 'BKMGT':
|
||||
total_size = self._convert_size_to_bytes(parts[1])
|
||||
used_size = self._convert_size_to_bytes(parts[2])
|
||||
usage_percent = float(parts[4].rstrip('%'))
|
||||
|
||||
filesystem = {
|
||||
'mountpoint': mountpoint,
|
||||
'total': parts[1],
|
||||
|
||||
Reference in New Issue
Block a user