Dryrun Debugging

This commit is contained in:
2025-03-03 17:14:11 -05:00
parent 662bb70822
commit ae473b387e

View File

@ -291,6 +291,14 @@ class SystemHealthMonitor:
if network_health.get(network, {}).get('issues'): if network_health.get(network, {}).get('issues'):
issues.extend(network_health[network]['issues']) issues.extend(network_health[network]['issues'])
logger.debug("=== Issue Detection Started ===")
logger.debug(f"Checking drives: {len(health_report['drives_health']['drives'])} found")
logger.debug(f"Memory status: {health_report['memory_health']['status']}")
logger.debug(f"CPU status: {health_report['cpu_health']['status']}")
logger.debug(f"Network status: {health_report['network_health']}")
logger.debug(f"Detected issues: {issues}")
logger.debug("=== Issue Detection Completed ===\n")
return issues return issues
def _is_physical_disk(self, device_path): def _is_physical_disk(self, device_path):
@ -352,6 +360,12 @@ class SystemHealthMonitor:
f"Known problematic firmware version {firmware_info['version']} " f"Known problematic firmware version {firmware_info['version']} "
f"for {firmware_info['model']}" f"for {firmware_info['model']}"
) )
logger.debug(f"=== Firmware Check for {device} ===")
logger.debug(f"Firmware version: {firmware_info['version']}")
logger.debug(f"Model: {firmware_info['model']}")
logger.debug(f"Manufacturer: {firmware_info['manufacturer']}")
logger.debug(f"Known issues: {firmware_info['known_issues']}")
logger.debug("=== End Firmware Check ===\n")
except Exception as e: except Exception as e:
firmware_info['known_issues'].append(f"Error checking firmware: {str(e)}") firmware_info['known_issues'].append(f"Error checking firmware: {str(e)}")
@ -362,8 +376,6 @@ class SystemHealthMonitor:
""" """
Enhanced SMART health check with detailed failure thresholds. Enhanced SMART health check with detailed failure thresholds.
""" """
logger.debug(f"Checking SMART health for device: {device}")
smart_health = { smart_health = {
'status': 'HEALTHY', 'status': 'HEALTHY',
'severity': 'NORMAL', 'severity': 'NORMAL',
@ -497,6 +509,14 @@ class SystemHealthMonitor:
except: except:
pass # Skip performance metrics if hdparm fails pass # Skip performance metrics if hdparm fails
logger.debug(f"=== SMART Health Check for {device} ===")
logger.debug("Raw SMART attributes:")
for attr, value in smart_health['attributes'].items():
logger.debug(f"{attr}: {value}")
logger.debug(f"Temperature: {smart_health['temp']}°C")
logger.debug(f"Detected Issues: {smart_health['issues']}")
logger.debug("=== End SMART Check ===\n")
except Exception as e: except Exception as e:
smart_health['status'] = 'ERROR' smart_health['status'] = 'ERROR'
smart_health['severity'] = 'UNKNOWN' smart_health['severity'] = 'UNKNOWN'