fix(observability): stop the UPS dashboard reporting a battery that isn't there - #30
Merged
Conversation
…sn't there mjolnir has no battery pack fitted. Its management card does not report that — it fabricates a healthy one: upsBatteryStatus 2 (batteryNormal) upsEstimatedChargeRemaining 100 upsEstimatedMinutesRemaining 63 upsBatteryVoltage 480 (48.0 V) upsAlarmsPresent 0 So the dashboard shows a green battery status and 63 minutes of runtime that do not exist, and UpsBatteryLow, UpsChargeLow, UpsRuntimeCritical and UpsAlarmPresent all sit comfortably inside their thresholds and will stay there. The missing battery is known and tracked. The hazard this fixes is different: the monitoring currently gives positive reassurance about it. A green UPS panel reads as "an hour of runtime", at the exact moment that is most wrong. Adds a banner to the dashboard, marks the four fabricated panels in their titles and descriptions, and rewrites the rules-file header to say plainly that those rules cannot fire for this condition. Nothing is disabled: every rule becomes correct the moment a pack is fitted. Also marks Output power, which this NMC firmware reports as 0 regardless of actual draw while Output load reads 15%. Records the trap too: do not run a self-test to force an honest reading. A self-test transfers the load to battery, and with none fitted that is the outage it exists to warn about. Refs docs/roadmap.md Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
6 tasks
Gerrrt
added a commit
that referenced
this pull request
Aug 19, 2026
fix(observability): stop the UPS dashboard reporting a battery that isn't there
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.
Makes the missing UPS battery visible in the monitoring instead of hidden by it.
What changed
Output powermarked as not reported by this NMC.ups.rules.yamlheader rewritten to state that its battery rules cannot fire.No rule is disabled or altered. Every one becomes correct the moment a pack is fitted.
Why
mjolnirhas no battery pack fitted. The management card does not report that —it fabricates a healthy one:
So the dashboard shows a green battery status and 63 minutes of runtime that do
not exist, and
UpsBatteryLow,UpsChargeLow,UpsRuntimeCriticalandUpsAlarmPresentall sit comfortably inside their thresholds and will stay there.The missing battery is known and tracked in
docs/roadmap.md. The hazard thisaddresses is a different one: the monitoring currently offers positive
reassurance about it. A green UPS panel reads as "about an hour of runtime" at
the exact moment that is most wrong. A quiet
upsgroup is not evidence ofruntime, and nothing in the stack said so.
UpsOnBattery,UpsOverloadedandUpsBatteryTemperatureHighread mains-sideor load-side values and are unaffected — though
UpsOnBatterywould bereporting an outage already underway rather than warning of one.
The rules header also records a trap worth not discovering the hard way: do not
run a UPS self-test to force an honest reading. A self-test transfers the load
to battery, and with none fitted that is precisely the outage it exists to warn
about.
upsTestResultsSummaryis6(noTestsInitiated) and should stay there.Blast radius
One dashboard and one rules file’s comments. No alert expression, threshold,
route or receiver changes. No config, credential or segmentation change.
secrets/*.sops.yamlVerification
The new panel is
type: text, whichcheck_dashboards.pyexempts from thetargets requirement; every existing panel was shifted down 4 rows and the
overlap check passes.
make validatepasseslands on the next
make up; no reload needed for rules comments