Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
Description
Input power from UPS-MIB is shown 10 times too low.
Cause
In includes/discovery/sensors/ups-mib.inc.php the input power sensor is discovered with the global $scale (0.1):
## Input power
|
$oid_name = 'upsInputTruePower';
|
...
|
discover_sensor_ng($device, 'power', $mib, $oid_name, $oid, $index, $descr, $scale, $entry[$oid_name], $options);
|
$scale = 0.1 is correct for frequency and current (UPS-MIB reports 0.1 Hertz / 0.1 RMS Amp), but RFC 1628 defines upsInputTruePower in Watts (UNITS "Watts"), like upsOutputPower, which is already discovered without scaling.
Example (3-phase UPS, Jovy Atlas JOVYCUBE-T4S, see OBS-5359)
UPS-MIB::upsInputTruePower.1 = INTEGER: 5220 Watts
|
UPS-MIB::upsInputCurrent.1 = INTEGER: 228 0.1 RMS Amp
|
UPS-MIB::upsInputVoltage.1 = INTEGER: 236 RMS Volts
|
UPS-MIB::upsOutputPower.1 = INTEGER: 6585 Watts
|
Observium shows "Input Phase 1" power as 522 W, while the output phase shows about 6.6 kW. 236 V x 22.8 A also gives about 5.4 kVA, so 5220 W is the correct value.
Suggested fix
- discover_sensor_ng($device, 'power', $mib, $oid_name, $oid, $index, $descr, $scale, $entry[$oid_name], $options);
|
+ discover_sensor_ng($device, 'power', $mib, $oid_name, $oid, $index, $descr, 1, $entry[$oid_name], $options);
|
Applied locally and verified after rediscovery: input power now 5.5-5.7 kW per phase, consistent with ~14.5 kW output.
Observium version: trunk r15538
Attachments
Issue Links
- mentions
-
OBS-5359 generex-ups: discovery sysDescr regex does not match multi-word agent names ("Jovy Atlas SNMP Agent")
-
- Resolved
-