mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This reverts commit a3bb92074e
.
This commit is contained in:
@@ -63,10 +63,6 @@ modules:
|
||||
oid: hwEntityOpticalRxPower
|
||||
op: '<='
|
||||
value: 0
|
||||
-
|
||||
oid: hwEntityAdminStatus
|
||||
op: '='
|
||||
value: 12
|
||||
-
|
||||
oid: hwOpticalModuleInfoTable
|
||||
value: hwEntityOpticalTxPower
|
||||
@@ -82,10 +78,6 @@ modules:
|
||||
oid: hwEntityOpticalTxPower
|
||||
op: '<='
|
||||
value: 0
|
||||
-
|
||||
oid: hwEntityAdminStatus
|
||||
op: '='
|
||||
value: 12
|
||||
-
|
||||
oid: hwOpticalModuleInfoTable
|
||||
value: hwEntityOpticalLaneRxPower
|
||||
@@ -96,17 +88,11 @@ modules:
|
||||
index: 'lane-rx-{{ $index }}'
|
||||
divisor: 100
|
||||
group: '{{ $entPhysicalName }}'
|
||||
high_limit: hwEntityOpticalRxHighThreshold
|
||||
low_limit: hwEntityOpticalRxLowThreshold
|
||||
skip_values:
|
||||
-
|
||||
oid: hwEntityOpticalRxPower
|
||||
op: '>'
|
||||
value: 0
|
||||
-
|
||||
oid: hwEntityAdminStatus
|
||||
op: '='
|
||||
value: 12
|
||||
-
|
||||
oid: hwOpticalModuleInfoTable
|
||||
value: hwEntityOpticalLaneTxPower
|
||||
@@ -116,17 +102,11 @@ modules:
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'lane-tx-{{ $index }}'
|
||||
group: '{{ $entPhysicalName }}'
|
||||
high_limit: hwEntityOpticalTxHighThreshold
|
||||
low_limit: hwEntityOpticalTxLowThreshold
|
||||
skip_values:
|
||||
-
|
||||
oid: hwEntityOpticalTxPower
|
||||
op: '>'
|
||||
value: 0
|
||||
-
|
||||
oid: hwEntityAdminStatus
|
||||
op: '='
|
||||
value: 12
|
||||
divisor: 100
|
||||
voltage:
|
||||
data:
|
||||
|
@@ -117,7 +117,6 @@ if ($device['os'] == 'saf-cfm') {
|
||||
}
|
||||
|
||||
foreach ($entity_array as $entPhysicalIndex => $entry) {
|
||||
unset($ifIndex);
|
||||
if ($device['os'] == 'junos') {
|
||||
// Juniper's MIB doesn't have the same objects as the Entity MIB, so some values
|
||||
// are made up here.
|
||||
@@ -191,19 +190,6 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
|
||||
$entPhysicalIsFRU = $entry['entPhysicalIsFRU'];
|
||||
$entPhysicalAlias = $entry['entPhysicalAlias'];
|
||||
$entPhysicalAssetID = $entry['entPhysicalAssetID'];
|
||||
|
||||
//VRP devices seems to use LogicalEntity '1' instead of '0' like the default code checks.
|
||||
//Standard code is still run after anyway.
|
||||
if (array_key_exists('1', $entry) && array_key_exists('entAliasMappingIdentifier', $entry['1'])) {
|
||||
$ifIndex = $entry['1']['entAliasMappingIdentifier'];
|
||||
if (!strpos($ifIndex, 'fIndex') || $ifIndex == '') {
|
||||
unset($ifIndex);
|
||||
} else {
|
||||
$ifIndex_array = explode('.', $ifIndex);
|
||||
$ifIndex = $ifIndex_array[1];
|
||||
unset($ifIndex_array);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$entPhysicalDescr = array_key_exists('entPhysicalDescr', $entry) ? $entry['entPhysicalDescr'] : '';
|
||||
$entPhysicalContainedIn = array_key_exists('entPhysicalContainedIn', $entry) ? $entry['entPhysicalContainedIn'] : '';
|
||||
@@ -224,13 +210,14 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
|
||||
|
||||
if (isset($entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'])) {
|
||||
$ifIndex = $entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'];
|
||||
if (!strpos($ifIndex, 'fIndex') || $ifIndex == '') {
|
||||
unset($ifIndex);
|
||||
} else {
|
||||
$ifIndex_array = explode('.', $ifIndex);
|
||||
$ifIndex = $ifIndex_array[1];
|
||||
unset($ifIndex_array);
|
||||
}
|
||||
}
|
||||
|
||||
if (!strpos($ifIndex, 'fIndex') || $ifIndex == '') {
|
||||
unset($ifIndex);
|
||||
} else {
|
||||
$ifIndex_array = explode('.', $ifIndex);
|
||||
$ifIndex = $ifIndex_array[1];
|
||||
unset($ifIndex_array);
|
||||
}
|
||||
|
||||
// List of real names for cisco entities
|
||||
|
@@ -784,9 +784,6 @@ function discover_entity_physical(&$valid, $device, $entPhysicalIndex, $entPhysi
|
||||
'entPhysicalAlias' => $entPhysicalAlias,
|
||||
'entPhysicalAssetID' => $entPhysicalAssetID,
|
||||
);
|
||||
if (!empty($ifIndex)) {
|
||||
$update_data['ifIndex'] = $ifIndex;
|
||||
}
|
||||
dbUpdate($update_data, 'entPhysical', '`device_id`=? AND `entPhysicalIndex`=?', array($device['device_id'], $entPhysicalIndex));
|
||||
}//end if
|
||||
$valid[$entPhysicalIndex] = 1;
|
||||
|
Reference in New Issue
Block a user