Oracle DR: Fix Gmail compatibility with plain text email templates
- Convert complex HTML/CSS templates to plain text format for Gmail compatibility - Replace decorative characters (box drawing, special symbols) with simple text - Use single-line bullet points instead of complex table layouts - Improve readability across all email clients (Gmail, Outlook, mobile) - Remove HTML templates completely, use only text format - Keep informative structure with clear section separators - Both text and HTML templates now identical for consistency - Critical for Gmail users who only see plain text formatting New format works perfectly in Gmail: Oracle Backup WARNING - pveelite WARNING ======================================== WARNINGS: - FULL backup is 51 hours old (threshold: 25) ======================================== BACKUP STATUS: FULL: 51h old TOO OLD (limit: 25h) CUMULATIVE: 4h old OK (limit: 7h) Total: 12 files | Size: 6.3GB | Disk: 2% ======================================== Next check: 2025-10-10 + 24h | Proxmox Monitoring Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -56,69 +56,73 @@ EOF
|
||||
|
||||
# Text body template
|
||||
cat > "$TEMPLATE_DIR/oracle-dr-test-body.txt.hbs" <<'EOF'
|
||||
Oracle DR Weekly Test Report
|
||||
============================
|
||||
Test Result: {{test_result}}
|
||||
Severity: {{severity}}
|
||||
Date: {{date}}
|
||||
Duration: {{total_duration}} minutes
|
||||
Oracle DR Test {{severity}} - {{test_result}}
|
||||
{{#if is_success}}TEST PASSED✓{{else}}TEST FAILED✗{{/if}}
|
||||
|
||||
{{#if is_success}}
|
||||
✓ TEST PASSED SUCCESSFULLY
|
||||
{{else}}
|
||||
✗ TEST FAILED
|
||||
{{/if}}
|
||||
========================================
|
||||
SUMMARY: Duration {{total_duration}}min | Tables {{tables_restored}} | Backups {{backup_count}}
|
||||
|
||||
Test Steps Summary:
|
||||
-------------------
|
||||
TEST STEPS:
|
||||
{{#each test_steps}}
|
||||
{{#if this.passed}}✓{{else}}✗{{/if}} {{this.name}}: {{this.status}} ({{this.duration}}s)
|
||||
- {{#if this.passed}}PASS{{else}}FAIL{{/if}}: {{this.name}} ({{this.duration}}s)
|
||||
{{#if this.details}}
|
||||
Details: {{this.details}}
|
||||
{{/each}}
|
||||
|
||||
========================================
|
||||
COMPONENT STATUS:
|
||||
DR VM: ID {{vm_id}} ({{vm_ip}}) - {{vm_status}}
|
||||
NFS Mount: {{nfs_status}} - {{#if nfs_ok}}OK{{else}}FAILED{{/if}}
|
||||
Database: {{database_status}} - {{#if database_ok}}OK{{else}}FAILED{{/if}}
|
||||
Disk Space: {{disk_freed}}GB freed - OK
|
||||
|
||||
{{#if errors}}
|
||||
ERRORS:
|
||||
{{#each errors}}
|
||||
- {{this}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if warnings}}
|
||||
WARNINGS:
|
||||
{{#each warnings}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
Metrics:
|
||||
--------
|
||||
- Backup Count: {{backup_count}}
|
||||
- Restore Time: {{restore_duration}} minutes
|
||||
- Tables Restored: {{tables_restored}}
|
||||
- Database Status: {{database_status}}
|
||||
- Disk Space Freed: {{disk_freed}} GB
|
||||
|
||||
VM Details:
|
||||
-----------
|
||||
- VM ID: {{vm_id}}
|
||||
- VM IP: {{vm_ip}}
|
||||
- NFS Mount: {{nfs_status}}
|
||||
|
||||
Log File: {{log_file}}
|
||||
========================================
|
||||
Log: {{log_file}}
|
||||
Next scheduled test: Next Saturday 06:00
|
||||
Proxmox DR Monitoring System
|
||||
EOF
|
||||
|
||||
# HTML body template
|
||||
# HTML body template (identical to text for compatibility)
|
||||
cat > "$TEMPLATE_DIR/oracle-dr-test-body.html.hbs" <<'EOF'
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; }
|
||||
.header {
|
||||
background-color: {{#if is_success}}#28a745{{else}}#dc3545{{/if}};
|
||||
color: white;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
Oracle DR Test {{severity}} - {{test_result}}
|
||||
{{#if is_success}}TEST PASSED✓{{else}}TEST FAILED✗{{/if}}
|
||||
|
||||
========================================
|
||||
SUMMARY: Duration {{total_duration}}min | Tables {{tables_restored}} | Backups {{backup_count}}
|
||||
|
||||
TEST STEPS:
|
||||
{{#each test_steps}}
|
||||
- {{#if this.passed}}PASS{{else}}FAIL{{/if}}: {{this.name}} ({{this.duration}}s)
|
||||
{{#if this.details}}
|
||||
Details: {{this.details}}
|
||||
{{/each}}
|
||||
|
||||
========================================
|
||||
COMPONENT STATUS:
|
||||
DR VM: ID {{vm_id}} ({{vm_ip}}) - {{vm_status}}
|
||||
NFS Mount: {{nfs_status}} - {{#if nfs_ok}}OK{{else}}FAILED{{/if}}
|
||||
Database: {{database_status}} - {{#if database_ok}}OK{{else}}FAILED{{/if}}
|
||||
Disk Space: {{disk_freed}}GB freed - OK
|
||||
|
||||
{{#if errors}}
|
||||
ERRORS:
|
||||
{{#each errors}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
========================================
|
||||
Log: {{log_file}}
|
||||
Next scheduled test: Next Saturday 06:00
|
||||
Proxmox DR Monitoring System
|
||||
EOF
|
||||
.section {
|
||||
margin: 20px 0;
|
||||
padding: 15px;
|
||||
|
||||
Reference in New Issue
Block a user