if drive not in issue
This commit is contained in:
@ -437,10 +437,6 @@ class SystemHealthMonitor:
|
||||
hostname = socket.gethostname()
|
||||
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
priority = "⚠ HIGH" if "CRITICAL" in issue else "● MEDIUM"
|
||||
|
||||
# Add debug statements to track the issue
|
||||
logger.debug(f"Generating description for issue: {issue}")
|
||||
logger.debug(f"Issue type: {type(issue)}")
|
||||
|
||||
content_width = self.STANDARD_WIDTH - 2
|
||||
banner = f"""
|
||||
@ -472,7 +468,7 @@ class SystemHealthMonitor:
|
||||
"""
|
||||
|
||||
if "Drive" in issue:
|
||||
device = re.search(r'/dev/[a-zA-Z0-9]+', issue).group(0)
|
||||
device = re.search(r'/dev/[a-zA-Z0-9]+', issue).group(0) if '/dev/' in issue else None
|
||||
drive_info = next((d for d in health_report['drives_health']['drives'] if d['device'] == device), None)
|
||||
drive_details = self._get_drive_details(device)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user