Skip to content

Commit 4671000

Browse files
authored
Revert "Fix cxc input voltage divisor (librenms#18729)" (librenms#18731)
This reverts commit b86c841.
1 parent b86c841 commit 4671000

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

includes/discovery/functions.inc.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,6 @@ function get_device_divisor($device, $os_version, $sensor_type, $oid)
387387
if ($sensor_type == 'voltage') {
388388
return 10;
389389
}
390-
} elseif ($device['os'] == 'cxc') {
391-
if ($sensor_type == 'voltage' && str_starts_with($oid, '.1.3.6.1.2.1.33.1.3.3.1.3')) {
392-
return 10;
393-
}
394390
}
395391

396392
// UPS-MIB Defaults

resources/definitions/os_discovery/cxc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ modules:
9696
index: rectSysEstimatedBatteryRuntime.{{ $index }}
9797
descr: 'Estimated Battery Runtime'
9898
divisor: 16.66
99-
skip_value_lt: 0
99+
skip_value_lt: 0

tests/data/cxc_ups.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@
432432
"sensor_type": "rfc1628",
433433
"sensor_descr": "Input",
434434
"group": null,
435-
"sensor_divisor": 10,
435+
"sensor_divisor": 1,
436436
"sensor_multiplier": 1,
437-
"sensor_current": 122.2,
438-
"sensor_limit": 140.53,
437+
"sensor_current": 1222,
438+
"sensor_limit": 1405.3,
439439
"sensor_limit_warn": null,
440-
"sensor_limit_low": 103.87,
440+
"sensor_limit_low": 1038.7,
441441
"sensor_limit_low_warn": null,
442442
"sensor_alert": 1,
443443
"sensor_custom": "No",

0 commit comments

Comments
 (0)