Commit graph

7 commits

Author SHA1 Message Date
c545672efe fix(snmp): auto-rescale implausible temperature readings
Some MikroTik models report `mtxrGaugeValue` (mtxrGaugeUnit=1, °C) in
deci-degrees, while others — like the CRS317 in upstream test data —
return whole degrees. The MIB doesn't disclose which, so the YAML
profile can't pick one literal divisor. Result: a sensor that should
read 56.92 °C was being stored and alerted on as 5,692 °C.

- Towerops.Snmp.SensorScale.normalize/2: divide-by-10 a temperature
  reading until it falls below 150 °C, capped at 3 iterations. Other
  sensor types pass through untouched.
- DevicePollerWorker.poll_simple_sensor wires the normaliser in after
  the YAML divisor is applied, so live polling stops storing bogus
  values immediately.
- DeviceOverheating rule now bounds the query at 150 °C as defense in
  depth so a future scaling glitch never produces a 5,000 °C alert.
- mix towerops.fix_mikrotik_temperature_scaling backfills any rows
  already in the DB by re-running normalize/2 over them.
- routeros.yaml profile gets a comment pointing at the runtime
  normaliser instead of a wrong unconditional divisor.
2026-05-10 12:21:24 -05:00
a1efba0b0e
fix: remove incorrect temperature divisor for MikroTik sensors
MikroTik mtxrGaugeTable temperature sensors report values in whole
degrees Celsius, not tenths. The MIB defines the unit as 'celsius(1)'
without the 'deci-' prefix used for voltage (dV), current (dA), and
power (dW).

This matches LibreNMS behavior which does not apply a divisor to
temperature sensors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 16:45:10 -06:00
95eafd0c47
routeros fixes and latency rounding 2026-02-09 17:30:06 -06:00
8b71c4adb8 mib update from librenms 2026-01-28 13:38:31 -06:00
c36b1873eb
routeros fix 2026-01-25 16:59:32 -06:00
6e86f54aa0
mikrotik sensor fixes 2026-01-25 13:24:28 -06:00
7656ac7212
import yamls 2026-01-21 14:30:04 -06:00