UPS monitoring and shutdown orchestration for NUT
A Python-based UPS monitoring daemon for Network UPS Tools (NUT). Monitors one or more UPSes, orchestrates shutdown of VMs, containers, and remote servers during power events.
Most UPS shutdown tools handle one machine. If you have more than one, things get complicated fast:
| Challenge | Eneru Solution |
|---|---|
| Multiple UPSes powering different servers | ✅ Multi-UPS monitoring from a single instance |
| Multiple servers need coordinated shutdown | ✅ Orchestrated multi-server shutdown via SSH |
| VMs and containers need graceful stop | ✅ Libvirt VM and Docker/Podman container handling |
| Network mounts hang during power loss | ✅ Timeout-protected unmounting |
| No visibility during power events | ✅ Real-time TUI dashboard + notifications via 100+ services |
| Different systems need different commands | ✅ Per-server custom shutdown commands |
| Hypervisors need VM shutdown before host | ✅ Pre-shutdown actions (Proxmox, ESXi, XCP-ng, libvirt) |
| Battery estimates are unreliable | ✅ Multi-vector shutdown triggers |
| Network down during outage | ✅ Non-blocking notifications with persistent retry |
| Firmware recalibrates battery silently | ✅ Battery anomaly detection and alerts |
Homelabs, virtualization hosts (Proxmox, ESXi, libvirt), Docker/Podman container hosts, NAS systems (Synology, QNAP, TrueNAS), multi-UPS environments with multiple server groups, and mixed physical/virtual setups.
PyPI:
pip install eneru[notifications]Debian/Ubuntu:
curl -fsSL https://m4r1k.github.io/Eneru/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/eneru.gpg
echo "deb [arch=all signed-by=/usr/share/keyrings/eneru.gpg] https://m4r1k.github.io/Eneru/deb stable main" | sudo tee /etc/apt/sources.list.d/eneru.list
sudo apt update && sudo apt install eneruRHEL/Fedora:
sudo dnf install -y epel-release
sudo curl -o /etc/yum.repos.d/eneru.repo https://m4r1k.github.io/Eneru/rpm/eneru.repo
sudo dnf install eneru# Edit configuration
sudo nano /etc/ups-monitor/config.yaml
# Validate and start
eneru validate --config /etc/ups-monitor/config.yaml
sudo systemctl enable --now eneru.service
# Monitor in real time
eneru monitor --config /etc/ups-monitor/config.yamlups:
name: "[email protected]"
display_name: "Main UPS"
triggers:
low_battery_threshold: 20
critical_runtime_threshold: 600
local_shutdown:
enabled: trueups:
- name: "[email protected]"
display_name: "Rack A UPS"
is_local: true
remote_servers:
- name: "Proxmox Node"
enabled: true
host: "192.168.1.20"
user: "root"
- name: "[email protected]"
display_name: "Rack B UPS"
remote_servers:
- name: "NAS"
enabled: true
host: "192.168.1.30"
user: "admin"See the full documentation for complete configuration options.
- Monitor one or more UPSes from a single instance, each with its own shutdown group
- Real-time TUI dashboard (
eneru monitor) with color-coded status - Shutdown triggers: battery %, runtime, depletion rate, time on battery, FSD flag
- Battery anomaly alerts for unexpected charge drops while on line power, with jitter filtering for APC, CyberPower, and Ubiquiti UniFi UPS units
- Shuts down VMs, containers, remote servers, filesystems, and the local system in order
- Notifications to 100+ services (Discord, Slack, Telegram, ntfy, email) via Apprise
- Power quality monitoring: voltage, AVR, bypass, overload
- Dry-run mode for safe testing
- 296 tests, 9 Linux distros, E2E tests with real NUT/SSH/Docker on every commit
Eneru runs as a systemd daemon, not a container. It shuts down Docker/Podman containers during power events, so running inside a container would mean getting killed during its own shutdown sequence.
See the documentation for the full explanation.
Named after Eneru (エネル) from One Piece, the self-proclaimed God of Skypiea who ate the Goro Goro no Mi (Rumble-Rumble Fruit) and can control electricity. When the power from the grid fails, this tool takes over and shuts everything down safely. Unlimited power... management!
Full documentation at eneru.readthedocs.io:
- Getting Started - installation and basic setup
- Configuration - full config reference
- Shutdown Triggers - how shutdown decisions work
- Notifications - Discord, Slack, Telegram, etc.
- Remote Servers - SSH setup for NAS and other servers
- Testing - testing strategy and coverage
- Troubleshooting - common issues and solutions
MIT License - See LICENSE file for details.

