Pattern match debug
This commit is contained in:
@ -647,7 +647,7 @@ class SystemHealthMonitor:
|
||||
ticket_title = (
|
||||
f"[{hostname}]"
|
||||
f"[{self.TICKET_TEMPLATES['ACTION_TYPE']['AUTO']}]"
|
||||
f"[{self.TICKET_TEMPLATES['ISSUE_TYPE'][issue_type]}] "
|
||||
f"[{self.TICKET_TEMPLATES[f'{issue_type}_TYPE'][issue_type]}] "
|
||||
f"{issue} "
|
||||
f"[{self.TICKET_TEMPLATES['SCOPE']['SINGLE_NODE']}]"
|
||||
f"[{self.TICKET_TEMPLATES['ENVIRONMENT']['PRODUCTION']}]"
|
||||
@ -1380,6 +1380,28 @@ class SystemHealthMonitor:
|
||||
|
||||
try:
|
||||
parts = fs_line.split()
|
||||
|
||||
|
||||
# Before pattern matching
|
||||
logger.debug(f"=== Starting Path Exclusion Check ===")
|
||||
logger.debug(f"Path to check: {parts[5]}")
|
||||
logger.debug(f"Configured patterns: {self.CONFIG['EXCLUDED_PATTERNS']}")
|
||||
|
||||
# During pattern matching
|
||||
for pattern in self.CONFIG['EXCLUDED_PATTERNS']:
|
||||
match = re.match(pattern, parts[5])
|
||||
logger.debug(f"Pattern: {pattern}")
|
||||
logger.debug(f" └─ Match result: {bool(match)}")
|
||||
logger.debug(f" └─ Raw match data: {match if match else 'None'}")
|
||||
|
||||
# After pattern matching
|
||||
if any(re.match(pattern, parts[5]) for pattern in self.CONFIG['EXCLUDED_PATTERNS']):
|
||||
logger.debug(f"EXCLUDED: {parts[5]} matched one or more patterns")
|
||||
else:
|
||||
logger.debug(f"INCLUDED: {parts[5]} did not match any patterns")
|
||||
logger.debug("=== End Path Exclusion Check ===\n")
|
||||
|
||||
|
||||
if len(parts) >= 6:
|
||||
if any(re.match(pattern, parts[5]) for pattern in self.CONFIG['EXCLUDED_PATTERNS']) or \
|
||||
parts[5] in self.CONFIG['EXCLUDED_MOUNTS']:
|
||||
|
||||
Reference in New Issue
Block a user