diff --git a/hwmonDaemon.py b/hwmonDaemon.py index 7ce7b92..b0e59f6 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -1368,24 +1368,34 @@ 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']): if self.dry_run: 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 - filesystem = { - 'mountpoint': mountpoint, - 'total': parts[1], - 'used': parts[2], - 'available': parts[3], - 'usage_percent': usage_percent - } + 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], + 'used': parts[2], + 'available': parts[3], + 'usage_percent': usage_percent + } if usage_percent >= self.CONFIG['THRESHOLDS']['DISK_CRITICAL']: lxc_health['status'] = 'CRITICAL'