[monitoring] Fix fuse voltage alerts — divide raw deciVolt reading by 10
The tuya-bridge exporter reports `fuse_main_voltage` and
`fuse_garage_voltage` as raw uint16 from the Tuya protocol, which
encodes voltage in deciVolts (e.g. 2352 = 235.2V). The 200/260V
thresholds were comparing against the raw integer, so both
FuseMainVoltageAbnormal and FuseGarageVoltageAbnormal fired
continuously during normal mains conditions.
Dividing in the expression also makes `{{ $value }}V` render the
correct human-readable value in the alert summary.
Root fix would be in tuya-bridge `_decode_value()` where
`name.startswith("voltage")` returns `int.from_bytes(...)` without the
/10 scaling that `decode_voltage_threshold` applies. Leaving that
alone to avoid breaking the automatic_transfer_switch scrape which
uses a different code path (`parse_voltage_string`).
This commit is contained in:
parent
a5e4db9af8
commit
d231615ebb
1 changed files with 2 additions and 2 deletions
|
|
@ -979,14 +979,14 @@ serverFiles:
|
|||
annotations:
|
||||
summary: "Garage fuse temperature: {{ $value }}°C (threshold: 70°C)"
|
||||
- alert: FuseMainVoltageAbnormal
|
||||
expr: fuse_main_voltage < 200 or fuse_main_voltage > 260
|
||||
expr: fuse_main_voltage / 10 < 200 or fuse_main_voltage / 10 > 260
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "Main fuse voltage: {{ $value }}V (expected 200-260V)"
|
||||
- alert: FuseGarageVoltageAbnormal
|
||||
expr: fuse_garage_voltage < 200 or fuse_garage_voltage > 260
|
||||
expr: fuse_garage_voltage / 10 < 200 or fuse_garage_voltage / 10 > 260
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue