mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed version detection for HP switches
This commit is contained in:
@@ -12,7 +12,7 @@ $hardware = snmp_get($device, "sysObjectID.0", "-OQsv", "SNMPv2-MIB:HH3C-PRODUCT
|
||||
list(,$version,$features) = explode(",", $poll_device['sysDescr']);
|
||||
list(,,,$version) = explode(" ", $version);
|
||||
list(,,$features) = explode(" ", $features);
|
||||
if (empty($version)) {
|
||||
if(preg_match('/HP [a-zA-Z0-9-]+ Switch Software Version/',$poll_device['sysDescr'])) {
|
||||
list($version) = explode("\r", substr($poll_device['sysDescr'], strpos($poll_device['sysDescr'], "Release")+8));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user