mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add Serialnumber for some Dell ForceTen devices (#12960)
* Add Serialnumber for some Dell Force devices * Also in entity-physical * fix style * fix style * add testdata
This commit is contained in:
@@ -27,6 +27,7 @@ modules:
|
||||
- Dell-Vendor-MIB::productIdentificationVersion.0
|
||||
- DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitCodeVersion.1
|
||||
serial:
|
||||
- Dell-Vendor-MIB::productIdentificationServiceTag.1
|
||||
- Dell-Vendor-MIB::productIdentificationSerialNumber.0
|
||||
- DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitSerialNumber.1
|
||||
processors:
|
||||
|
@@ -117,6 +117,7 @@ if ($device['os'] == 'saf-cfm') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($device['os'] == 'ios' or $device['os'] == 'iosxe') {
|
||||
$tables = [
|
||||
['num_oid' => '.1.3.6.1.4.1.9.9.661.1.3.1.1.1.', 'oid' => 'c3gImsi', 'state_name' => 'c3gImsi', 'mib' => 'CISCO-WAN-3G-MIB', 'descr' => 'IMSI', 'entPhysicalIndex' => '9999'],
|
||||
@@ -250,6 +251,10 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
|
||||
$entPhysicalAssetID = array_key_exists('entPhysicalAssetID', $entry) ? $entry['entPhysicalAssetID'] : '';
|
||||
}//end if
|
||||
|
||||
if ($device['os'] == 'dnos' && $entPhysicalSerialNum == 'NA' && preg_match('/Unit/', $entPhysicalName)) {
|
||||
$entPhysicalSerialNum = snmp_get($device, '.1.3.6.1.4.1.674.10895.3000.1.2.100.8.1.4.' . preg_replace('/Unit (\d+)/', '$1', $entPhysicalName), '-Oqv', '');
|
||||
}
|
||||
|
||||
if (isset($entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'])) {
|
||||
$ifIndex = $entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'];
|
||||
if (! strpos($ifIndex, 'fIndex') || $ifIndex == '') {
|
||||
|
15540
tests/data/dnos_z9100-on.json
Normal file
15540
tests/data/dnos_z9100-on.json
Normal file
File diff suppressed because it is too large
Load Diff
5768
tests/snmpsim/dnos_z9100-on.snmprec
Normal file
5768
tests/snmpsim/dnos_z9100-on.snmprec
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user