newdevice: Added detection for HPE RT3000 UPS (#6638)

* newdevice: HPE RT3000 UPS

* newdevice: HPE RT3000 UPS

* changed polling to snmp_get_multi_oid, fixed divisor for load and voltage

* fixed blank line in functions.inc.php
This commit is contained in:
Marcus Pink 2017-05-16 22:42:10 +02:00 committed by Neil Lathwood
parent 155d9de8dc
commit 5b9623d8d4
4 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,15 @@
os: hpe-rtups
text: 'HP UPS'
group: ups
type: power
icon: hpe
rfc1628_compat: 1
mib_dir:
- hp
over:
- { graph: device_current, text: Current }
- { graph: device_voltage, text: Voltage }
- { graph: device_load, text: Load }
discovery:
- sysObjectId:
- .1.3.6.1.4.1.232.165.3

View File

@ -969,6 +969,12 @@ function get_device_divisor($device, $os_version, $sensor_type, $oid)
if ($sensor_type == 'load') {
return 1;
}
} elseif ($device['os'] == 'hpe-rtups') {
if ($sensor_type == 'load') {
return 1;
} elseif ($sensor_type == 'voltage' && !starts_with($oid, '.1.3.6.1.2.1.33.1.2.5.') && !starts_with($oid, '.1.3.6.1.2.1.33.1.3.3.1.3')) {
return 1;
}
}
return 10; //default

View File

@ -0,0 +1,7 @@
<?php
$rtups_data = snmp_get_multi_oid($device, 'deviceSerialNumber.0 deviceFirmwareVersion.0', '-OQs', 'CPQPOWER-MIB');
$serial = $rtups_data['deviceSerialNumber.0'];
$version = $rtups_data['deviceFirmwareVersion.0'];
unset($rtups_data);

View File

@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|HP UPS Network Module, revision BD06, firmware revision 1.05.001
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.232.165.3