initial commit; version 22.5.12042

This commit is contained in:
2022-12-12 23:28:25 -05:00
commit af1b03d79f
17653 changed files with 22692970 additions and 0 deletions

View File

@ -0,0 +1,37 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
$oids = snmp_cache_table($device, 'tmnxHwTable', NULL, 'TIMETRA-CHASSIS-MIB');
foreach ($oids as $index => $entry) {
list($chassis, $system_index) = explode('.', $index);
$inventory[$system_index] = array(
'entPhysicalDescr' => $entry['tmnxHwName'],
'entPhysicalClass' => $entry['tmnxHwClass'],
'entPhysicalName' => $entry['tmnxHwName'],
'entPhysicalAlias' => $entry['tmnxHwAlias'],
'entPhysicalAssetID' => $entry['tmnxHwAssetID'],
'entPhysicalIsFRU' => $entry['tmnxHwIsFRU'],
'entPhysicalSerialNum' => $entry['tmnxHwSerialNumber'],
'entPhysicalContainedIn' => $entry['tmnxHwContainedIn'],
'entPhysicalParentRelPos' => $entry['tmnxHwParentRelPos'],
'entPhysicalMfgName' => $entry['tmnxHwMfgString'] // 'Alcatel-Lucent'
);
if ($entry['tmnxHwContainedIn'] === '0' && $entry['tmnxHwParentRelPos'] === '-1') {
$inventory[$system_index]['entPhysicalName'] .= ' '.$chassis;
}
discover_inventory($device, $system_index, $inventory[$system_index], $mib);
}
// EOF