HP r5000 UPS, problem with incorrect values in health

Hello,

yesterday I added HP r5000 UPS to librenms. But there is a problem with VOLTAGE input, where I getting 500V what is wrong and when I looked in to FREQUENCY input I getting 0.1 HZ. Also in the CURRENT I getting 23.6A

I know that for Voltage Input is a correct OID where I getting : .1.3.6.1.2.1.33.1.3.3.1.4.1 = INTEGER: 236
I know that for for Frequency input is a correct OID where I getting .1.3.6.1.2.1.33.1.3.3.1.3.1 = INTEGER: 499

When I caputred Discovery I saw that problem librenms using wrong OID for VOLTAGE Input and for Frequency ipnut

    .SNMP[/usr/bin/snmpwalk -v1 -c COMMUNITY -OQUsetX -m UPS-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/ups:/opt/librenms/mibs/hp -t 10 -r 2 udp:HOSTNAME:161 upsInputVoltage]
upsInputVoltage[1] = 500
Discover sensor: .1.3.6.1.2.1.33.1.3.3.1.3.1, 101, rfc1628, Input, snmp, 1, 1, , 500
    SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'voltage' AND `device_id` = '499' AND sensor_type = 'rfc1628' AND `sensor_index` = '101'] 
    SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'voltage' AND `device_id` = '499' AND `sensor_type` = 'rfc1628' AND `sensor_index` = '101'] 

Discover sensor: .1.3.6.1.2.1.33.1.3.3.1.4.1, 101, rfc1628, Input, snmp, 10, 1, , 23.5
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'current' AND `device_id` = '499' AND sensor_type = 'rfc1628' AND `sensor_index` = '101'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'current' AND `device_id` = '499' AND `sensor_type` = 'rfc1628' AND `sensor_index` = '101'] 
.SNMP[/usr/bin/snmpwalk -v1 -c COMMUNITY -OQUsetX -m UPS-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/ups:/opt/librenms/mibs/hp -t 10 -r 2 udp:HOSTNAME:161 upsBypassCurrent]
upsBypassCurrent[1] = 0

And for FREQUENCY Input I got this what is wrong, tooo

Frequency: RFC1628 SNMP[/usr/bin/snmpwalk -v1 -c COMMUNITY -OQUsetX -m UPS-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/ups:/opt/librenms/mibs/hp -t 10 -r 2 udp:HOSTNAME:161 upsInputFrequency]
upsInputFrequency[1] = 1

Discover sensor: .1.3.6.1.2.1.33.1.3.3.1.2.1, 3.2.0.1, rfc1628, Input, snmp, 10, 1, , 0.1
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'frequency' AND `device_id` = '499' AND sensor_type = 'rfc1628' AND `sensor_index` = '3.2.0.1'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'frequency' AND `device_id` = '499' AND `sensor_type` = 'rfc1628' AND `sensor_index` = '3.2.0.1'] 

Because I need there value of this OID .1.3.6.1.2.1.33.1.3.3.1.3.1 = INTEGER: 499

Please help what Can i Do with this ?

Ok i got it, I changed in opt/librenms/includes/discovery/sensors/voltage/rfc1628.inc

from

$input_volts = snmpwalk_group($device, 'upsInputVoltage', 'UPS-MIB');
    foreach ($input_volts as $index => $data) {
        $volt_oid = ".1.3.6.1.2.1.33.1.3.3.1.4.$index";
        $divisor = get_device_divisor($device, $pre_cache['poweralert_serial'], 'voltage', $volt_oid);
        $descr = 'Input';
        if (count($input_volts) > 1) {
            $descr .= " Phase $index";
        }

to
> $input_volts = snmpwalk_group($device, ‘upsInputVoltage’, ‘UPS-MIB’);

foreach ($input_volts as $index => $data) {
    $volt_oid = ".1.3.6.1.2.1.33.1.3.3.1.4.$index";
    $divisor = get_device_divisor($device, $pre_cache['poweralert_serial'], 'voltage', $volt_oid);
    $descr = 'Input';
    if (count($input_volts) > 1) {
        $descr .= " Phase $index";
    }

opt/librenms/includes/discovery/sensors/frequency/rfc1628.inc

from

$input_freq = snmpwalk_group($device, ‘upsInputFrequency’, ‘UPS-MIB’);
foreach ($input_freq as $index => $data) {
$freq_oid = “.1.3.6.1.2.1.33.1.3.3.1.2.$index”;
$divisor = get_device_divisor($device, $pre_cache[‘poweralert_serial’], ‘frequency’, $freq_oid);
$descr = ‘Input’;
if (count($input_freq) > 1) {
$descr .= " Phase $index";
}

to

$input_freq = snmpwalk_group($device, ‘upsInputFrequency’, ‘UPS-MIB’);
foreach ($input_freq as $index => $data) {
$freq_oid = “.1.3.6.1.2.1.33.1.3.3.1.3.$index”;
$divisor = get_device_divisor($device, $pre_cache[‘poweralert_serial’], ‘frequency’, $freq_oid);
$descr = ‘Input’;
if (count($input_freq) > 1) {
$descr .= " Phase $index";
}

I actually can’t see what you’ve changed voltage file.

As for frequency change, you’ve basically changed the oid to be the Voltage OID so that sounds like your device has a bug.

I changed these OIDs because in a code of LIbrenms is s wrong OID for HP r5000 UPS which is using rfc1628 MIB. I tried to find on the internet a example of monitoring possibilities of that device and I found a cacti template where was used this OIDs for voltage and for frequency and this OIDs worked correctly for me. So question is what is wrong. Maybe I have an old firmware on that device or I dont know. But for now I am getting a correct value, when I changed these OIDs.

So rfc1628 is a standards mib, if your device isn’t using the correct values from this then you really need to raise this with the vendor.