From fbdb57eb58d1eafb2b1df418b62bdb824cdf7644 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Mon, 6 Apr 2026 15:43:47 +0300 Subject: [PATCH] fix(monitoring): UsingInverterEnergyForTooLong only alerts when stuck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed from simple time-based (24h on inverter) to condition-based: only fires when on inverter AND battery charge <80% for 1h. This means normal daytime inverter usage won't trigger alerts — only fires when the grid is unavailable and battery is draining. --- .../modules/monitoring/prometheus_chart_values.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl b/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl index 227b8194..c849da40 100755 --- a/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl +++ b/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl @@ -763,12 +763,12 @@ serverFiles: annotations: summary: "Server power: {{ $value | printf \"%.0f\" }}W (threshold: 300W)" - alert: UsingInverterEnergyForTooLong - expr: automatic_transfer_switch_power_mode > 0 # 1 = Inverter; 0 = Grid - for: 24h + expr: automatic_transfer_switch_power_mode > 0 and on() ups_upsEstimatedChargeRemaining < 80 + for: 1h labels: - severity: info + severity: warning annotations: - summary: "On inverter for >24h - check grid switchover" + summary: "On inverter with battery draining ({{ $value }}% charge) - may be stuck on inverter" - alert: UPSAlarmsActive expr: ups_upsAlarmsPresent > 0 for: 5m