Strip volatile values from ticket titles (usage %, OSD counts)
- LXC/ZFS storage usage percentages: "usage high: 80.1%" → "usage high" - LXC "high storage usage: 80.1% on /mnt" → "high storage usage on /mnt" - Ceph BlueStore OSD counts: "2 OSD(s) experiencing slow" → "OSD(s) experiencing slow" (count fluctuates every run) These changing values embedded in titles were triggering a "Title updated" comment on every hourly run even though nothing meaningfully changed. Values are fully retained in the ticket description. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+11
-3
@@ -1919,10 +1919,18 @@ class SystemHealthMonitor:
|
||||
clean_issue = clean_issue.replace('[cluster-wide] ', '').replace('[cluster-wide]', '')
|
||||
# Remove [ceph] marker since _categorize_issue adds it as issue_tag
|
||||
clean_issue = clean_issue.replace('[ceph] ', '').replace('[ceph]', '')
|
||||
# Strip ever-changing SMART counters from the title so the title stays
|
||||
# stable across runs and doesn't trigger hourly "Title updated" comment spam.
|
||||
# The counter values are already captured in the ticket description.
|
||||
# Strip volatile values from the title so it stays stable across runs
|
||||
# and doesn't trigger a "Title updated" comment every cycle.
|
||||
# Values are fully captured in the ticket description.
|
||||
|
||||
# SMART counters: "Warning Power_On_Hours: 62664" → removed
|
||||
clean_issue = re.sub(r':\s*(?:Warning|Critical)\s+\w+:\s*\d+', '', clean_issue).strip(': ').strip()
|
||||
# Storage/ZFS usage percentages: "usage high: 80.1%" → "usage high"
|
||||
clean_issue = re.sub(r'(usage\s+(?:high|critical|warning)):\s*[\d.]+%', r'\1', clean_issue, flags=re.IGNORECASE)
|
||||
# LXC storage: "high storage usage: 80.1% on /mnt/foo" → "high storage usage on /mnt/foo"
|
||||
clean_issue = re.sub(r'((?:high|critical)\s+storage\s+usage):\s*[\d.]+%', r'\1', clean_issue, flags=re.IGNORECASE)
|
||||
# BlueStore / Ceph OSD counts: "2 OSD(s) experiencing" → "OSD(s) experiencing"
|
||||
clean_issue = re.sub(r'\b\d+\s+(OSD\(s\))', r'\1', clean_issue, flags=re.IGNORECASE)
|
||||
|
||||
# Extract drive capacity if this is a drive-related issue.
|
||||
# Issue strings now use serial numbers; find the matching drive by serial.
|
||||
|
||||
Reference in New Issue
Block a user