Oracle DR: Fix template variables and complete monitoring system testing
- Fix Proxmox template compatibility: {{hostname}} → {{node}}, {{timestamp}} → {{date}}
- Remove duplicate node fields and fix JSON structure
- Complete full testing plan execution for monitoring and DR test scripts
- Validate notification system functionality with PVE::Notify
- Sync tested scripts from production back to repository
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -46,7 +46,7 @@ create_templates() {
|
||||
|
||||
# Subject template
|
||||
cat > "$TEMPLATE_DIR/oracle-backup-subject.txt.hbs" <<'EOF'
|
||||
Oracle Backup {{severity}} - {{hostname}}
|
||||
Oracle Backup {{severity}} - {{node}}
|
||||
EOF
|
||||
|
||||
# Text body template
|
||||
@@ -54,8 +54,8 @@ EOF
|
||||
Oracle Backup Monitoring Alert
|
||||
==============================
|
||||
Severity: {{severity}}
|
||||
Hostname: {{hostname}}
|
||||
Date: {{timestamp}}
|
||||
Hostname: {{node}}
|
||||
Date: {{date}}
|
||||
Status: {{status}}
|
||||
|
||||
{{#if errors}}
|
||||
@@ -115,7 +115,7 @@ EOF
|
||||
<body>
|
||||
<div class="header">
|
||||
<h2>Oracle Backup {{severity}}</h2>
|
||||
<p>{{hostname}} - {{timestamp}}</p>
|
||||
<p>{{node}} - {{date}}</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
@@ -331,7 +331,8 @@ check_backups() {
|
||||
{
|
||||
"severity": "$severity",
|
||||
"hostname": "$(hostname)",
|
||||
"timestamp": "$(date '+%Y-%m-%d %H:%M:%S')",
|
||||
"node": "$(hostname)",
|
||||
"date": "$(date +'%Y-%m-%d %H:%M:%S')",
|
||||
"status": "$status",
|
||||
"errors": $errors_json,
|
||||
"warnings": $warnings_json,
|
||||
|
||||
@@ -60,7 +60,7 @@ Oracle DR Weekly Test Report
|
||||
============================
|
||||
Test Result: {{test_result}}
|
||||
Severity: {{severity}}
|
||||
Date: {{timestamp}}
|
||||
Date: {{date}}
|
||||
Duration: {{total_duration}} minutes
|
||||
|
||||
{{#if is_success}}
|
||||
@@ -213,7 +213,7 @@ EOF
|
||||
<div class="header">
|
||||
<h1>Oracle DR Test Report</h1>
|
||||
<h2>{{#if is_success}}✓ TEST PASSED{{else}}✗ TEST FAILED{{/if}}</h2>
|
||||
<p>{{timestamp}} | Duration: {{total_duration}} minutes</p>
|
||||
<p>{{date}} | Duration: {{total_duration}} minutes</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
@@ -542,7 +542,7 @@ run_dr_test() {
|
||||
{
|
||||
"severity": "$severity",
|
||||
"test_result": "$test_result",
|
||||
"timestamp": "$(date '+%Y-%m-%d %H:%M:%S')",
|
||||
"date": "$(date '+%Y-%m-%d %H:%M:%S')",
|
||||
"total_duration": $total_duration,
|
||||
"is_success": $is_success,
|
||||
"test_steps": [$steps_json],
|
||||
|
||||
Reference in New Issue
Block a user