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>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
========================================
|
||||
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
|
||||
========================================
|
||||
Reference in New Issue
Block a user