mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Basic Support for Fiberstore devices * Basic Support for Fiberstore devices * mib files * sysObjectID added * mibs added * MIB corrections + CPU discovery + version and SN * CodeClimate + mempools * CodeClimate + mempools * mempools * 5800 * testdata * 5800 * tests * mempools for 5800 * CodeClimate * CodeClimate * Cleaning and comments * Tests for 5800 * CodeClimate * Update Fs.php * init processors[] * optimized logo * optimized logo * optimized logo * optimized logo * split FS devices * split FS devices * split FS devices - tests * split FS devices - class * split FS devices - class * split FS devices - tests * removing un-necessry condition * text and comments
43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
<?php
|
|
|
|
if (!empty($matches[2])) {
|
|
$version .= " (" . trim($matches[2]) . ")";
|
|
}
|
|
|
|
// List of OIDs for HW recognition, add any potential HW OID here.
|
|
$hwOidList = [
|
|
'.1.3.6.1.4.1.27975.37.1.5.1.4.1.1',
|
|
];
|
|
foreach ($hwOidList as $oid) {
|
|
$hardware_tmp = snmp_get($device, $oid, '-OQv');
|
|
if (!empty($hardware_tmp)) {
|
|
$hardware = $hardware_tmp;
|
|
}
|
|
}
|
|
|
|
// List of OIDs for version, add any potential OID here.
|
|
// As the mib is really buggy, let's use numeric OID for now
|
|
$verOidList = [
|
|
'.1.3.6.1.4.1.27975.1.3.5.0', //SWITCH::version.0
|
|
];
|
|
foreach ($verOidList as $oid) {
|
|
$version_tmp = snmp_get($device, $oid, '-OQv');
|
|
if (!empty($version_tmp)) {
|
|
$version = $version_tmp;
|
|
break;
|
|
}
|
|
}
|
|
|
|
//List of OIDs for SN, add any potential device SN OID here
|
|
$snOidList = [
|
|
'.1.3.6.1.4.1.27975.37.1.5.1.10.1.1',
|
|
];
|
|
foreach ($snOidList as $oid) {
|
|
$serial_tmp = snmp_get($device, $oid, '-OQv');
|
|
|
|
if (!empty($serial_tmp)) {
|
|
$serial = $serial_tmp;
|
|
break;
|
|
}
|
|
}
|