diff --git a/containers/backupchecks/src/backend/app/parsers/registry.py b/containers/backupchecks/src/backend/app/parsers/registry.py index b2fc100..1ea80b4 100644 --- a/containers/backupchecks/src/backend/app/parsers/registry.py +++ b/containers/backupchecks/src/backend/app/parsers/registry.py @@ -50,13 +50,13 @@ PARSER_DEFINITIONS = [ }, "description": "Parses NTFS Auditing file audit report mails (attachment-based HTML reports).", "example": { - "subject": "Bouter btr-dc001.bouter.nl file audits → 6 ↑ 12", - "from_address": "auditing@bouter.nl", + "subject": "SERVER-HOSTNAME file audits → 6 ↑ 12", + "from_address": "auditing@example.local", "body_snippet": "(empty body, HTML report in attachment)", "parsed_result": { "backup_software": "NTFS Auditing", "backup_type": "Audit", - "job_name": "btr-dc001.bouter.nl file audits", + "job_name": "SERVER-HOSTNAME file audits", "objects": [], }, }, @@ -73,16 +73,42 @@ PARSER_DEFINITIONS = [ }, "description": "Parses QNAP Notification Center firmware update notifications (informational; excluded from reporting and missing logic).", "example": { - "subject": "[Info][Firmware Update] Notification from your device: BETSIES-NAS01", + "subject": "[Info][Firmware Update] Notification from your device: NAS-HOSTNAME", "from_address": "notifications@customer.tld", - "body_snippet": "NAS Name: BETSIES-NAS01\n...\nMessage: ...", + "body_snippet": "NAS Name: NAS-HOSTNAME\n...\nMessage: ...", "parsed_result": { "backup_software": "QNAP", "backup_type": "Firmware Update", "job_name": "Firmware Update", "overall_status": "Warning", "objects": [ - {"name": "BETSIES-NAS01", "status": "Warning", "error_message": None} + {"name": "NAS-HOSTNAME", "status": "Warning", "error_message": None} + ], + }, + }, + }, + { + "name": "synology_dsm_update", + "backup_software": "Synology", + "backup_types": ["Updates"], + "order": 236, + "enabled": True, + "match": { + "subject_contains_any": ["DSM-update", "DSM update"], + "body_contains_any": ["automatische DSM-update", "automatic DSM update", "Automatic update of DSM"], + }, + "description": "Parses Synology DSM automatic update cancelled notifications (informational; excluded from reporting and missing logic).", + "example": { + "subject": "Synology NAS-HOSTNAME - Automatische DSM-update op NAS-HOSTNAME is geannuleerd door het systeem", + "from_address": "backup@example.local", + "body_snippet": "Het systeem heeft de automatische DSM-update op NAS-HOSTNAME geannuleerd...", + "parsed_result": { + "backup_software": "Synology", + "backup_type": "Updates", + "job_name": "Synology Automatic Update", + "overall_status": "Warning", + "objects": [ + {"name": "NAS-HOSTNAME", "status": "Warning"} ], }, }, @@ -383,16 +409,16 @@ PARSER_DEFINITIONS = [ }, "description": "Parses NAKIVO Backup & Replication reports for VMware backup jobs.", "example": { - "subject": '"exchange01.kuiperbv.nl" job: Successful', + "subject": '"VM-HOSTNAME" job: Successful', "from_address": "NAKIVO Backup & Replication ", "body_snippet": "Job Run Report... Backup job for VMware ... Successful", "parsed_result": { "backup_software": "NAKIVO", "backup_type": "Backup job for VMware", - "job_name": "exchange01.kuiperbv.nl", + "job_name": "VM-HOSTNAME", "objects": [ { - "name": "exchange01.kuiperbv.nl", + "name": "VM-HOSTNAME", "status": "Success", "error_message": "", } diff --git a/docs/changelog-claude.md b/docs/changelog-claude.md index 2bc0cab..f5eaf46 100644 --- a/docs/changelog-claude.md +++ b/docs/changelog-claude.md @@ -8,9 +8,11 @@ This file documents all changes made to this project via Claude Code. - Added "Cleanup orphaned jobs" maintenance option in Settings → Maintenance to delete jobs without valid customer links and their associated emails/runs permanently from database (useful when customers are removed) - Added "Preview orphaned jobs" button to show detailed list of jobs to be deleted with run/email counts before confirming deletion (verification step for safety) - Added "Generate test emails" feature in Settings → Maintenance with three separate buttons to create fixed test email sets (success/warning/error) in inbox for testing parsers and maintenance operations (each set contains exactly 3 Veeam Backup Job emails with the same job name "Test-Backup-Job" and different dates/objects/statuses for reproducible testing and proper status flow testing) +- Added parser registry entry for Synology DSM automatic update cancelled notifications (backup software: Synology, backup type: Updates, informational only, no schedule learning) ### Changed - Removed customer name from Autotask ticket title to keep titles concise (format changed from "[Backupchecks] Customer - Job Name - Status" to "[Backupchecks] Job Name - Status") +- Replaced real customer names in parser registry examples with generic placeholders (NTFS Auditing, QNAP Firmware Update, NAKIVO) to prevent customer information in codebase ### Fixed - Fixed Autotask ticket description being set to NULL when resolving tickets via `update_ticket_resolution_safe` by adding "description" to the optional_fields list, ensuring the original description is preserved during PUT operations