Intelligent UPS Monitoring & Shutdown Orchestration for NUT
Project description
⚡ Eneru
UPS monitoring and shutdown orchestration for NUT
A Python-based UPS monitoring daemon that watches UPS status via Network UPS Tools (NUT) and executes configurable shutdown sequences during power events.
Why Eneru?
Most UPS shutdown solutions handle a single system. Eneru handles multiple systems:
| Challenge | Eneru Solution |
|---|---|
| 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 | ✅ 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 |
Use cases
Homelabs, virtualization hosts (Proxmox, ESXi, libvirt), Docker/Podman container hosts, NAS systems (Synology, QNAP, TrueNAS), multi-server environments on a single UPS, and mixed physical/virtual setups.
Quick start
Installation
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 eneru
RHEL/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
Configuration
# Edit configuration
sudo nano /etc/ups-monitor/config.yaml
# Validate and start
sudo python3 /opt/ups-monitor/eneru.py --validate-config
sudo systemctl enable --now eneru.service
Minimal Config
ups:
name: "UPS@192.168.1.100"
triggers:
low_battery_threshold: 20
critical_runtime_threshold: 600
local_shutdown:
enabled: true
See the full documentation for complete configuration options.
Features
- Multiple shutdown triggers: battery %, runtime, depletion rate, time on battery, FSD flag
- Orchestrated shutdown of VMs, containers, remote servers, filesystems, and the local system
- Notifications to 100+ services (Discord, Slack, Telegram, ntfy, email) via Apprise, with non-blocking persistent retry
- Power quality monitoring: voltage, AVR, bypass, and overload detection
- Dry-run mode for safe configuration testing
- Unit tests, integration tests across 7 Linux distros, and E2E tests with real NUT/SSH/Docker services on every commit
Why a systemd daemon? (No Docker)
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.
The name
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!
Documentation
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
License
MIT License - See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eneru-4.11.tar.gz.
File metadata
- Download URL: eneru-4.11.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0a625e55e5724abd183e0059bd2a6e4f099bc95d25e0d9bd02f96a3aeee9ba
|
|
| MD5 |
f4bf7d698460fcabe837d09824bb67e1
|
|
| BLAKE2b-256 |
7e58d5624ff82ec0d89db6862302524f7d70e87ffa01ae79951376bd67b42fee
|
Provenance
The following attestation bundles were made for eneru-4.11.tar.gz:
Publisher:
pypi.yml on m4r1k/Eneru
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eneru-4.11.tar.gz -
Subject digest:
9f0a625e55e5724abd183e0059bd2a6e4f099bc95d25e0d9bd02f96a3aeee9ba - Sigstore transparency entry: 1216517512
- Sigstore integration time:
-
Permalink:
m4r1k/Eneru@3b9f2503a682148c3449405f9a03e851b64a0ca3 -
Branch / Tag:
refs/tags/v4.11 - Owner: https://github.com/m4r1k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@3b9f2503a682148c3449405f9a03e851b64a0ca3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file eneru-4.11-py3-none-any.whl.
File metadata
- Download URL: eneru-4.11-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f5e0f49bcd6301c515be4e0aa098bf7a40ca69484f6b8d028c785ee232d62e1
|
|
| MD5 |
3c9a2b200784114fad5c74afdf235c66
|
|
| BLAKE2b-256 |
a1221689b2954d7af9bc5a43768ef487ff947e3af41fded44d671f8ccf16cf2c
|
Provenance
The following attestation bundles were made for eneru-4.11-py3-none-any.whl:
Publisher:
pypi.yml on m4r1k/Eneru
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eneru-4.11-py3-none-any.whl -
Subject digest:
6f5e0f49bcd6301c515be4e0aa098bf7a40ca69484f6b8d028c785ee232d62e1 - Sigstore transparency entry: 1216517606
- Sigstore integration time:
-
Permalink:
m4r1k/Eneru@3b9f2503a682148c3449405f9a03e851b64a0ca3 -
Branch / Tag:
refs/tags/v4.11 - Owner: https://github.com/m4r1k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@3b9f2503a682148c3449405f9a03e851b64a0ca3 -
Trigger Event:
release
-
Statement type: