change percent to pattern
This commit is contained in:
@ -651,7 +651,7 @@ class SystemHealthMonitor:
|
|||||||
f"{issue} "
|
f"{issue} "
|
||||||
f"[{self.TICKET_TEMPLATES['SCOPE']['SINGLE_NODE']}]"
|
f"[{self.TICKET_TEMPLATES['SCOPE']['SINGLE_NODE']}]"
|
||||||
f"[{self.TICKET_TEMPLATES['ENVIRONMENT']['PRODUCTION']}]"
|
f"[{self.TICKET_TEMPLATES['ENVIRONMENT']['PRODUCTION']}]"
|
||||||
f"[{self.TICKET_TEMPLATES['TYPE']['MAINTENANCE']}]"
|
f"[{self.TICKET_TEMPLATES['TICKET_TYPE']['MAINTENANCE']}]"
|
||||||
)
|
)
|
||||||
description = self._generate_detailed_description(issue, health_report)
|
description = self._generate_detailed_description(issue, health_report)
|
||||||
|
|
||||||
@ -1403,8 +1403,19 @@ class SystemHealthMonitor:
|
|||||||
|
|
||||||
|
|
||||||
if len(parts) >= 6:
|
if len(parts) >= 6:
|
||||||
if any(re.match(pattern, parts[5]) for pattern in self.CONFIG['EXCLUDED_PATTERNS']) or \
|
mountpoint = parts[5] # This is the actual path
|
||||||
parts[5] in self.CONFIG['EXCLUDED_MOUNTS']:
|
logger.debug(f"=== Starting Path Exclusion Check ===")
|
||||||
|
logger.debug(f"Path to check: {mountpoint}")
|
||||||
|
logger.debug(f"Configured patterns: {self.CONFIG['EXCLUDED_PATTERNS']}")
|
||||||
|
|
||||||
|
for pattern in self.CONFIG['EXCLUDED_PATTERNS']:
|
||||||
|
match = re.match(pattern, mountpoint)
|
||||||
|
logger.debug(f"Pattern: {pattern}")
|
||||||
|
logger.debug(f" └─ Match result: {bool(match)}")
|
||||||
|
logger.debug(f" └─ Raw match data: {match if match else 'None'}")
|
||||||
|
|
||||||
|
if any(re.match(pattern, mountpoint) for pattern in self.CONFIG['EXCLUDED_PATTERNS']):
|
||||||
|
logger.debug(f"EXCLUDED: {mountpoint} matched one or more patterns")
|
||||||
continue
|
continue
|
||||||
# Convert size strings to comparable values
|
# Convert size strings to comparable values
|
||||||
total = parts[2]
|
total = parts[2]
|
||||||
|
|||||||
Reference in New Issue
Block a user