Skip to main content

Intelligent UPS Monitoring & Shutdown Orchestration for NUT

Project description

⚡ Eneru

Intelligent UPS Monitoring & Shutdown Orchestration for NUT

License: MIT Python 3.9+ NUT Compatible codecov Documentation PyPI

Eneru Architecture

A Python-based UPS monitoring daemon that watches UPS status via Network UPS Tools (NUT) and executes configurable shutdown sequences to protect your entire infrastructure during power events.

DocumentationGetting StartedConfigurationChangelog


✨ Why Eneru?

Most UPS shutdown solutions are single-system focused. Eneru is designed for modern infrastructure:

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 ✅ Real-time notifications via 100+ services
Different systems need different commands ✅ Per-server custom shutdown commands
Hypervisors need graceful VM shutdown ✅ 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

🎯 Built For

  • 🏠 Homelabs - Protect your self-hosted infrastructure
  • 🖥️ Virtualization Hosts - Graceful VM shutdown before power loss
  • 🐳 Container Hosts - Stop Docker/Podman containers safely
  • 📦 NAS Systems - Coordinate shutdown of Synology, QNAP, TrueNAS
  • 🏢 Small Business - Multi-server environments with single UPS
  • ☁️ Hybrid Setups - Mix of physical and virtual infrastructure

🚀 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

  • Multi-vector shutdown triggers - Battery %, runtime, depletion rate, time on battery, FSD flag
  • Orchestrated shutdown - VMs, containers, remote servers, filesystems, local system
  • 100+ notification services - Discord, Slack, Telegram, ntfy, Email via Apprise
  • Non-blocking notifications - Persistent retry without delaying shutdown
  • Power quality monitoring - Voltage, AVR, bypass, and overload detection
  • Dry-run mode - Test your configuration safely
  • Tested on every commit - Full test suite across 7 Linux distros ensures no regressions

🤔 Why an Old-Fashioned Systemd Daemon? (No Docker)

Eneru runs as a systemd daemon, not a container. This is intentional—Eneru's job is to shut down Docker/Podman containers during power events. If Eneru ran inside a container, it would be killed during its own shutdown sequence.

See the documentation for the full explanation.


⚡ The Name

Eneru from One Piece

Named after Eneru (エネル) from One Piece—the self-proclaimed God of Skypiea who ate the Goro Goro no Mi (Rumble-Rumble Fruit), granting him absolute control over electricity. Just as Eneru commands lightning from the sky, this tool commands your infrastructure when the power from the grid fails. Unlimited power... management!


📚 Documentation

Full documentation is available at eneru.readthedocs.io:


📄 License

MIT License - See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eneru-4.8.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eneru-4.8-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file eneru-4.8.tar.gz.

File metadata

  • Download URL: eneru-4.8.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eneru-4.8.tar.gz
Algorithm Hash digest
SHA256 87cfe11af0eae630715a5bfeaf5b9afe0e3daa0bf38e662f67fc904959648347
MD5 483da84d623134152167ad5d94c9bc3d
BLAKE2b-256 b9f8104263dd6d25eaa8f8bba855be44be9e1ff4837b350a86258645247d3a72

See more details on using hashes here.

Provenance

The following attestation bundles were made for eneru-4.8.tar.gz:

Publisher: pypi.yml on m4r1k/Eneru

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eneru-4.8-py3-none-any.whl.

File metadata

  • Download URL: eneru-4.8-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eneru-4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4099c87d01bb6a2b2ae42f7a982bf3cbc9a65b6ce5b7562239ef0d30217807cf
MD5 fa5b61ee2b729a5ad5b56fea5cfef73c
BLAKE2b-256 21c7cf52badffe4f0b8dcdf55fed34dfc8705e2137cf8a6a058940a5eb8f8194

See more details on using hashes here.

Provenance

The following attestation bundles were made for eneru-4.8-py3-none-any.whl:

Publisher: pypi.yml on m4r1k/Eneru

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page