mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
device: Fix awplus $hardware for certain products (#8123)
awplus.inc.php uses snmpgetnext for $hardware. This works well for 99% of products however chassis product SBx8100 does not show the chassis as the first product. This adds an exception to follow for this product
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
<?php
|
||||
|
||||
//$hardware and $serial use snmp_getnext as the OID for these is not always fixed.
|
||||
//However, the first OID is the device baseboard.
|
||||
//However, the first OID is the device baseboard.
|
||||
|
||||
$hardware = snmp_getnext($device, "rscBoardName", "-OQv", "AT-RESOURCE-MIB");
|
||||
$version = snmp_get($device, "currSoftVersion.0", "-OQv", "AT-SETUP-MIB");
|
||||
$hostname = snmp_get($device, "sysName.0", "-OQv", "SNMPv2-MIB");
|
||||
$serial = snmp_getnext($device, "rscBoardSerialNumber", "-OQv", "AT-RESOURCE-MIB");
|
||||
|
||||
// SBx8100 platform has line cards show up first in "rscBoardName" above.
|
||||
if (strpos($hardware, 'SBx81') !== false) {
|
||||
$hardware = snmp_get($device, "sysObjectID.0", "-OQvs", "SNMPv2-MIB:AT-PRODUCT-MIB");
|
||||
$hardware = str_replace('at', '', $hardware);
|
||||
}
|
||||
|
Reference in New Issue
Block a user