server: UPS monitoring via NUT + PeaNUT dashboard#59
Merged
Conversation
Adds a nut package entry (server/apt) and a linux-server/ups/ service dir: standalone NUT config for usbhid-ups on loopback, an idempotent sudo setup.sh that renders the upsmon password from a gitignored .env into /etc/nut, and a NOTIFYCMD hook pushing power events to ntfy. Low battery triggers a clean shutdown + UPS outlet power-off so the server restarts when wall power returns. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Host-networked PeaNUT container on :8097 (upsd is loopback-only) with charge/load/runtime graphs, plus a homepage ups card using the native peanut widget. Runtime settings dir gitignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Moves the homepage ups tile from the raw LAN port to the standard peanut.<tailnet>.ts.net convention: host-networked-variant sidecar (per HTTPS.md, like glances) proxying to :8097, HOMEPAGE_VAR_PEANUT_DOMAIN for the tile href, widget still reads localhost. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Adds UPS monitoring for the CyberPower PR1500LCDRT2U so the home server can see
battery/load/runtime and react to power events. Deployed and running live
(
peanut/peanut-tshealthy).What
nuttalks to the CyberPower over USB; config +notify hook in
linux-server/ups/(ups.conf,upsd.conf,upsmon.conf,ups-notify.sh,setup.sh, README).https://peanut.<tailnet>.ts.net,same decoupled-sidecar pattern as the other services.
peanut-config/(PeaNUT's runtime settings) is intentionally gitignored — PeaNUTmanages it locally, no template needed.
Note on overlap with #58
This branch's
f542763adds a PeaNUT card tohomepage/config/services.yamlagainst the old flat layout. PR #58 reflows that same file into nested rows, so
whichever of #58 / this PR merges second will hit a
services.yamlconflict —resolve by keeping the reflowed structure and slotting the PeaNUT card into the
Network group. (The glances-rename commit that used to live here,
ba31db2, wasfolded into #58 and dropped from this branch to avoid a duplicate.)
Test plan
upsc <ups>reports battery.charge / ups.load / battery.runtime.ups.statusflips to OB (on battery), notify hook fires.🤖 Generated with Claude Code