Files
ROMFASTSQL/proxmox/ups/config/notification-templates/ups-power-event-body.txt.hbs
Marius ab6ac77d50 Add UPS email notifications and automatic UPS shutdown
- Add email notifications via PVE::Notify for all UPS events:
  - ONBATT: when UPS switches to battery
  - ONLINE: when power is restored
  - LOWBATT: critical battery level
  - SHUTDOWN_START/NODE/PRIMARY: during cluster shutdown
  - COMMBAD: communication lost with UPS

- Add automatic UPS shutdown command after cluster shutdown
  (protects against power surge when power returns)

- Update upssched.conf with ONLINE handler and immediate ONBATT notification

- Add notification templates for HTML and text emails

- Update documentation with new features and timer configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 20:11:30 +02:00

32 lines
708 B
Handlebars

========================================
UPS POWER EVENT - {{ event_title }}
========================================
Hostname: {{ hostname }}
Date: {{ event_date }}
Event: {{ event_type }}
{{ event_description }}
UPS STATUS:
-----------
Status: {{ ups_status }}
Battery Charge: {{ battery_charge }}%
Input Voltage: {{ input_voltage }}V
{{#if battery_runtime}}
Battery Runtime: {{ battery_runtime }} min
{{/if}}
{{#if action_taken}}
ACTION: {{ action_taken }}
{{/if}}
{{#if next_steps}}
NEXT STEPS: {{ next_steps }}
{{/if}}
========================================
Log: /var/log/ups-events.log
Script: /usr/local/bin/upssched-cmd
========================================