mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
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:
parent
155d9de8dc
commit
5b9623d8d4
15
includes/definitions/hpe-rtups.yaml
Normal file
15
includes/definitions/hpe-rtups.yaml
Normal 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
|
@ -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
|
||||
|
7
includes/polling/os/hpe-rtups.inc.php
Normal file
7
includes/polling/os/hpe-rtups.inc.php
Normal 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);
|
2
tests/snmpsim/hpe-rtups.snmprec
Normal file
2
tests/snmpsim/hpe-rtups.snmprec
Normal 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
|
Loading…
Reference in New Issue
Block a user