mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
FS.COM (Fiberstore) 'GBN' and 'SWITCH' devices support (#9734)
* 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
This commit is contained in:
22
includes/discovery/mempools/fs-switch.inc.php
Normal file
22
includes/discovery/mempools/fs-switch.inc.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
//
|
||||
// Discovery for FS-switch devices.
|
||||
//
|
||||
|
||||
if ($device['os'] == 'fs-switch') {
|
||||
echo 'FS : ';
|
||||
$mempools_array = snmpwalk_cache_oid($device, 'memTotalReal', [], 'SWITCH', 'fs');
|
||||
$mempools_array = snmpwalk_cache_oid($device, 'memTotalFree', $mempools_array, 'SWITCH', 'fs');
|
||||
$mempools_array = snmpwalk_cache_oid($device, 'memTotalUsed', $mempools_array, 'SWITCH', 'fs');
|
||||
d_echo($mempools_array);
|
||||
foreach ($mempools_array as $index => $entry) {
|
||||
if ($entry['memTotalReal'] > 0) {
|
||||
d_echo($index.' '.$entry['memTotalReal'].' -> '.$entry['memTotalFree']."\n");
|
||||
$descr = "Chassis";
|
||||
$descr .= " Memory";
|
||||
$usage = $entry['memTotalFree'];
|
||||
discover_mempool($valid_mempool, $device, $index, 'fs-switch', $descr, '1', null, null);
|
||||
} //end if
|
||||
} //end foreach
|
||||
} //end if
|
||||
unset($mempools_array);
|
Reference in New Issue
Block a user