From 607dea31865cbc854466b0faf30dfdb194e3b67a Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Thu, 16 Apr 2026 08:29:42 -0400 Subject: [PATCH] Strip volatile values from ticket titles (usage %, OSD counts) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- hwmonDaemon.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index c131b01..bc3a68f 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -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.