mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-05 20:03:48 +00:00
Update notification_templates.py
This commit is contained in:
@@ -1001,7 +1001,7 @@ EVENT_GROUPS = {
|
||||
}
|
||||
|
||||
|
||||
# ─── Template Renderer ─<EFBFBD><EFBFBD>─────────────────────────────────────────
|
||||
# ─── Template Renderer ───────────────────────────────────────────
|
||||
|
||||
def _get_hostname() -> str:
|
||||
"""Get short hostname for message titles."""
|
||||
@@ -1620,75 +1620,13 @@ BODY EMOJIS:
|
||||
|
||||
BLANK LINES: Insert between logical sections (VM entries, before summary, before packages block).
|
||||
|
||||
═══ EXAMPLES (follow these formats) ═══
|
||||
═══ FORMATTING RULES ═══
|
||||
|
||||
IMPORTANT: {hostname} is a placeholder. Always use the ACTUAL hostname from the original message.
|
||||
|
||||
BACKUP START:
|
||||
[TITLE]
|
||||
💾🚀 {hostname}: Backup started
|
||||
[BODY]
|
||||
Backup job starting on storage PBS.
|
||||
🏷️ VMs: web01 (100)
|
||||
|
||||
🗄️ Storage: PBS | ⚙️ Mode: stop
|
||||
|
||||
BACKUP COMPLETE:
|
||||
[TITLE]
|
||||
💾✅ {hostname}: Backup complete
|
||||
[BODY]
|
||||
Backup job finished on storage local-bak.
|
||||
|
||||
🏷️ VM web01 (ID: 100)
|
||||
✔️ Status: ok
|
||||
💽 Size: 12.3 GiB
|
||||
⏱️ Duration: 00:04:21
|
||||
🗄️ Storage: vm/100/2026-03-17T22:00:08Z
|
||||
|
||||
📊 Total: 1 backup | 💾 12.3 GiB | ⏱️ 00:04:21
|
||||
|
||||
BACKUP PARTIAL FAIL:
|
||||
[TITLE]
|
||||
💾❌ {hostname}: Backup partially failed
|
||||
[BODY]
|
||||
Backup job finished with errors.
|
||||
|
||||
🏷️ VM web01 (ID: 100)
|
||||
✔️ Status: ok
|
||||
💽 Size: 12.3 GiB
|
||||
|
||||
🏷️ VM broken (ID: 102)
|
||||
❌ Status: error
|
||||
|
||||
📊 Total: 2 backups | ❌ 1 failed
|
||||
|
||||
UPDATES:
|
||||
[TITLE]
|
||||
📦 {hostname}: Updates available
|
||||
[BODY]
|
||||
📦 Total updates: 24
|
||||
🔒 Security updates: 6
|
||||
🔄 Proxmox updates: 0
|
||||
|
||||
🗂️ Important packages:
|
||||
• none
|
||||
|
||||
VM/CT START:
|
||||
[TITLE]
|
||||
🚀 {hostname}: VM arch-linux (100) started
|
||||
[BODY]
|
||||
🏷️ Virtual machine arch-linux (ID: 100)
|
||||
✔️ Now running
|
||||
|
||||
HEALTH DEGRADED:
|
||||
[TITLE]
|
||||
⚠️ {hostname}: Health warning — Disk I/O
|
||||
[BODY]
|
||||
💿 Device: /dev/sda
|
||||
⚠️ 1 sector unreadable (pending)
|
||||
📝 Log: process crashed (exit-code 255)
|
||||
⚠️ Recurring: 5 times in 24h
|
||||
💡 Tip: Run 'systemctl status pvedaemon'"""
|
||||
1. USE THE INPUT MESSAGE AS YOUR BASE: The original message already has the correct structure, hostname, and data.
|
||||
2. PRESERVE ALL ORIGINAL DATA: Keep hostname, VM/CT names, IDs, sizes, durations exactly as provided.
|
||||
3. ENHANCE, DON'T REPLACE: Add emojis for visual clarity using the icons above, but maintain the original structure.
|
||||
4. ADD CONTEXT IF PROVIDED: If additional context (logs, known errors, suggestions) is provided, append it using appropriate icons.
|
||||
5. NEVER INVENT FACTS: Do not invent hostnames, IDs, sizes, or technical data. Suggestions and tips based on provided context are allowed."""
|
||||
|
||||
|
||||
# No emoji instructions for email/plain text channels
|
||||
|
||||
Reference in New Issue
Block a user