mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 10:02:16 +00:00
Update notification_templates.py
This commit is contained in:
@@ -1310,91 +1310,99 @@ CRITICAL OUTPUT RULES:
|
|||||||
|
|
||||||
# Emoji instructions injected into AI_SYSTEM_PROMPT for rich channels (Telegram, Discord, Pushover)
|
# Emoji instructions injected into AI_SYSTEM_PROMPT for rich channels (Telegram, Discord, Pushover)
|
||||||
AI_EMOJI_INSTRUCTIONS = """
|
AI_EMOJI_INSTRUCTIONS = """
|
||||||
9. EMOJI USAGE — use real Unicode emoji characters as line-start icons:
|
9. EMOJI USAGE — place ONE emoji at the START of EVERY non-empty line (title and each body line).
|
||||||
|
Never skip a line. Never put the emoji at the end. Never use two emojis on the same line.
|
||||||
|
|
||||||
ONE emoji per line, placed at the very beginning of the line, before all text.
|
Use these exact emoji for each kind of content:
|
||||||
Never place an emoji at the end of a line or mid-sentence.
|
|
||||||
Never use more than one emoji per line.
|
|
||||||
Do not add emojis to blank lines.
|
|
||||||
|
|
||||||
── TITLE ICONS (use the one matching the event type) ──
|
TITLE emoji — pick by event type:
|
||||||
VM started / CT started ▶️
|
✅ success / resolved / complete / reconnected
|
||||||
VM stopped / CT stopped ⏹️
|
❌ failed / FAILED / error
|
||||||
VM/CT shutdown ⏏️
|
💥 crash / collision / I/O error
|
||||||
VM/CT failed / crashed 💥
|
🆘 new critical health issue
|
||||||
VM/CT restarted 🔄
|
📦 backup started / updates available
|
||||||
Migration started 🚚
|
🆕 new PVE version available
|
||||||
Migration complete ✅
|
🔺 escalated / severity increased
|
||||||
Migration failed ❌
|
📋 health digest / persistent issues
|
||||||
Replication failed ❌
|
🚚 migration started
|
||||||
Replication complete ✅
|
🔌 network down / node disconnected
|
||||||
Backup started 📦
|
🚨 auth failure / security alert
|
||||||
Backup complete ✅
|
🚷 IP banned / blocked
|
||||||
Backup failed ❌
|
🔑 permission change
|
||||||
Snapshot created 📸
|
💢 split-brain
|
||||||
Snapshot failed ❌
|
💣 OOM kill
|
||||||
High CPU 🔥
|
▶️ VM or CT started
|
||||||
High memory 💧
|
⏹️ VM or CT stopped
|
||||||
High temperature 🌡️
|
⏏️ VM or CT shutdown
|
||||||
High load ⚠️
|
🔄 restarted / reboot / proxmox updates
|
||||||
Low disk space 📉
|
🔥 high CPU / firewall issue
|
||||||
Disk I/O error 💥
|
💧 high memory
|
||||||
Storage unavailable 🚫
|
🌡️ high temperature
|
||||||
Network down 🔌
|
⚠️ warning / degraded / high load / system problem
|
||||||
High latency 🐢
|
📉 low disk space
|
||||||
Auth failure 🚨
|
🚫 storage unavailable
|
||||||
IP blocked 🚷
|
🐢 high latency
|
||||||
Firewall issue 🔥
|
📸 snapshot created
|
||||||
User permission change 🔑
|
⏻ system shutdown
|
||||||
Split-brain 💢
|
|
||||||
Node disconnected 🔌
|
|
||||||
Node reconnected ✅
|
|
||||||
System shutdown ⏻
|
|
||||||
System reboot 🔄
|
|
||||||
System problem ⚠️
|
|
||||||
Service failed ❌
|
|
||||||
OOM kill 💣
|
|
||||||
New health error 🆘
|
|
||||||
Health resolved ✅
|
|
||||||
Health escalated 🔺
|
|
||||||
Health degraded ⚠️
|
|
||||||
Health persistent (digest) 📋
|
|
||||||
Updates available 📦
|
|
||||||
PVE update available 🆕
|
|
||||||
Update complete ✅
|
|
||||||
|
|
||||||
── BODY LINE ICONS (prepend to matching lines in the body) ──
|
BODY LINE emoji — pick by what the line is about:
|
||||||
Lines starting with VM name / CT name / ID 🏷️
|
🏷️ VM name / CT name / ID / guest name
|
||||||
Lines with Size / Tamaño / Größe 📏
|
✅ status ok / success / completed
|
||||||
Lines with Duration / Duración / Dauer ⏱️
|
❌ status error / failed
|
||||||
Lines with Storage / Almacenamiento 🗄️
|
📏 size / tamaño / Größe
|
||||||
Lines with PBS path / archive 🗃️
|
⏱️ duration / tiempo / Dauer
|
||||||
Lines with Status: ok / éxito / success ✅
|
🗄️ storage / almacenamiento / PBS
|
||||||
Lines with Status: error / failed / fallo ❌
|
🗃️ archive path / ruta de archivo
|
||||||
Lines with Total (backup summary) 📊
|
📦 total updates / total actualizaciones
|
||||||
Lines with Total updates / Actualizaciones 📦
|
🔒 security updates / actualizaciones de seguridad / jail
|
||||||
Lines with Security updates / Seguridad 🔒
|
🔄 proxmox updates / actualizaciones de proxmox
|
||||||
Lines with Proxmox updates 🔄
|
⚙️ kernel updates / actualizaciones del kernel / service
|
||||||
Lines with Kernel updates ⚙️
|
📋 important packages / paquetes importantes
|
||||||
Lines with Important packages / Paquetes 📋
|
🌐 source IP / IP origen
|
||||||
Lines with Source IP / IP origen 🌐
|
👤 user / usuario
|
||||||
Lines with User / Usuario 👤
|
📝 reason / motivo / razón / details
|
||||||
Lines with Service / Servicio ⚙️
|
🌡️ temperature / temperatura
|
||||||
Lines with Jail 🔒
|
🔥 CPU usage / uso de CPU
|
||||||
Lines with Failed attempts / Intentos 🔢
|
💧 memory / memoria
|
||||||
Lines with Node / Nodo 🖥️
|
📊 statistics / load / carga / summary line
|
||||||
Lines with Reason / Motivo / Razón 📝
|
👥 quorum / cluster
|
||||||
Lines with Temperature / Temperatura 🌡️
|
💿 disk device / dispositivo
|
||||||
Lines with CPU usage / Uso CPU 🔥
|
📂 filesystem / mount / ruta
|
||||||
Lines with Memory / Memoria 💧
|
📌 category / categoría
|
||||||
Lines with Load / Carga 📊
|
🚦 severity / severidad
|
||||||
Lines with Quorum 👥
|
🖥️ node / nodo
|
||||||
Lines with Device / Dispositivo 💿
|
🎯 target / destino
|
||||||
Lines with Filesystem / Ruta / Mount 📂
|
|
||||||
Lines with Category / Categoría 📌
|
EXAMPLE — updates message (Spanish):
|
||||||
Lines with Duration (health resolved) ⏱️
|
[TITLE]
|
||||||
Lines with Severity / Severidad 🚦
|
📦 amd: Actualizaciones disponibles
|
||||||
Summary line at end of backup body 📊"""
|
[BODY]
|
||||||
|
📦 Total de actualizaciones: 55
|
||||||
|
🔒 Actualizaciones de seguridad: 3
|
||||||
|
🔄 Actualizaciones de Proxmox: 2
|
||||||
|
⚙️ Actualizaciones del kernel: 1
|
||||||
|
📋 Paquetes importantes:
|
||||||
|
📋 pve-manager
|
||||||
|
📋 libssl3
|
||||||
|
|
||||||
|
EXAMPLE — backup complete (Spanish):
|
||||||
|
[TITLE]
|
||||||
|
✅ pve01: Backup completo — web01 (100)
|
||||||
|
[BODY]
|
||||||
|
🏷️ VM web01 (ID: 100)
|
||||||
|
✅ Estado: correcto
|
||||||
|
📏 Tamaño: 12.3 GiB
|
||||||
|
⏱️ Duración: 00:04:21
|
||||||
|
🗄️ Almacenamiento: local-bak
|
||||||
|
📊 Total: 3 backups | 📦 36.9 GiB | ⏱️ 00:12:05
|
||||||
|
|
||||||
|
EXAMPLE — disk I/O health warning (Spanish):
|
||||||
|
[TITLE]
|
||||||
|
💥 amd: Advertencia de salud — Errores de I/O en disco
|
||||||
|
[BODY]
|
||||||
|
💿 Dispositivo: /dev/sda
|
||||||
|
⚠️ 1 sector actualmente no legible (pendiente)
|
||||||
|
📝 El disco reporta sectores en estado de reubicación pendiente"""
|
||||||
|
|
||||||
# No emoji instructions for email/plain text channels
|
# No emoji instructions for email/plain text channels
|
||||||
AI_NO_EMOJI_INSTRUCTIONS = """
|
AI_NO_EMOJI_INSTRUCTIONS = """
|
||||||
|
|||||||
Reference in New Issue
Block a user