mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Feature: Collect VRP Entity details in the Huawei MIB (#8888)
* Feature: Collect VRP Entity details in the Huawei MIB * Feature: Collect VRP Entity details in the Huawei MIB - Add Test Data * Renaming of the test file vrp_5720_vrf.snmprec * Added json test files * Update vrp_5720_vrf.snmprec * Update vrp_5720_vrf.snmprec * Update vrp_5720_vrf.json * Updated processor and mempool discovery to limit descr field * Updated test * Updated tests again * Updated json test data * Update vrp_ce12804-entity.json * Update vrp_ce12804-entity.json * Update vrp_5720_vrf.json
This commit is contained in:
@@ -19,6 +19,12 @@ if ($device['os'] == 'junos') {
|
||||
$entity_array = snmpwalk_cache_twopart_oid($device, 'entAliasMappingIdentifier', $entity_array, 'ENTITY-MIB:IF-MIB');
|
||||
}
|
||||
}
|
||||
if ($device['os'] == 'vrp') {
|
||||
echo ' hwEntityBoardType';
|
||||
$entity_array = snmpwalk_cache_oid($device, 'hwEntityBoardType', $entity_array, 'ENTITY-MIB:HUAWEI-ENTITY-EXTENT-MIB');
|
||||
echo ' hwEntityBomEnDesc';
|
||||
$entity_array = snmpwalk_cache_oid($device, 'hwEntityBomEnDesc', $entity_array, 'ENTITY-MIB:HUAWEI-ENTITY-EXTENT-MIB');
|
||||
}
|
||||
|
||||
foreach ($entity_array as $entPhysicalIndex => $entry) {
|
||||
if ($device['os'] == 'junos') {
|
||||
@@ -59,6 +65,23 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
|
||||
$entPhysicalAlias = $entry['tmnxHwAlias'];
|
||||
$entPhysicalAssetID = $entry['tmnxHwAssetID'];
|
||||
$entPhysicalIndex = str_replace('.', '', $entPhysicalIndex);
|
||||
} elseif ($device['os'] == 'vrp') {
|
||||
//Add some details collected in the VRP Entity Mib
|
||||
$entPhysicalDescr = $entry['hwEntityBomEnDesc'];
|
||||
$entPhysicalContainedIn = $entry['entPhysicalContainedIn'];
|
||||
$entPhysicalClass = $entry['entPhysicalClass'];
|
||||
$entPhysicalName = $entry['entPhysicalName'];
|
||||
$entPhysicalSerialNum = $entry['entPhysicalSerialNum'];
|
||||
$entPhysicalModelName = $entry['hwEntityBoardType'];
|
||||
$entPhysicalMfgName = $entry['entPhysicalMfgName'];
|
||||
$entPhysicalVendorType = $entry['entPhysicalVendorType'];
|
||||
$entPhysicalParentRelPos = $entry['entPhysicalParentRelPos'];
|
||||
$entPhysicalHardwareRev = $entry['entPhysicalHardwareRev'];
|
||||
$entPhysicalFirmwareRev = $entry['entPhysicalFirmwareRev'];
|
||||
$entPhysicalSoftwareRev = $entry['entPhysicalSoftwareRev'];
|
||||
$entPhysicalIsFRU = $entry['entPhysicalIsFRU'];
|
||||
$entPhysicalAlias = $entry['entPhysicalAlias'];
|
||||
$entPhysicalAssetID = $entry['entPhysicalAssetID'];
|
||||
} else {
|
||||
$entPhysicalDescr = $entry['entPhysicalDescr'];
|
||||
$entPhysicalContainedIn = $entry['entPhysicalContainedIn'];
|
||||
|
@@ -665,6 +665,9 @@ function discover_processor(&$valid, $device, $oid, $index, $type, $descr, $prec
|
||||
|
||||
function discover_mempool(&$valid, $device, $index, $type, $descr, $precision = '1', $entPhysicalIndex = null, $hrDeviceIndex = null)
|
||||
{
|
||||
|
||||
$descr = substr($descr, 0, 64);
|
||||
|
||||
d_echo("Discover Mempool: $index, $type, $descr, $precision, $entPhysicalIndex, $hrDeviceIndex\n");
|
||||
|
||||
// FIXME implement the mempool_perc, mempool_used, etc.
|
||||
|
Reference in New Issue
Block a user