mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Update comware version and serial number polling (#6686)
This commit is contained in:
committed by
Neil Lathwood
parent
c6882129e8
commit
5bb2610488
@@ -8,7 +8,9 @@ echo 'Comware OS...';
|
||||
|
||||
$hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:HH3C-PRODUCT-ID-MIB');
|
||||
|
||||
$data = str_replace(",", "", $poll_device['sysDescr']);
|
||||
$explodeddata = explode(" ", $data);
|
||||
$version = $explodeddata['6'];
|
||||
$features = $explodeddata['8'];
|
||||
preg_match('/Version ([0-9.]+).*Release ([0-9P]+)/', $poll_device['sysDescr'], $version_match);
|
||||
$version = $version_match[1];
|
||||
$features = $version_match[2];
|
||||
|
||||
$serial_nums = explode("\n", trim(snmp_walk($device, 'hh3cEntityExtManuSerialNum', '-Osqv', 'HH3C-ENTITY-EXT-MIB')));
|
||||
$serial = $serial_nums[0]; // use the first s/n
|
||||
|
||||
Reference in New Issue
Block a user