mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* New OS: Aruba Instant * New OS: Aruba Instant * recreate test data * remove aruba_instant test data * remove empty file includes/definitions/discovery/aruba-instant.yaml * fix state sensor discovery * remove minor changes to includes/polling/functions.inc.phpwq * move mac helper functions to Rewrite class * simplify snmpwalk_group usage, general code cleanup * fixes * fixes * fixes * fixes * fixes * fixes * recreate test data for 105 variant * Add Client sensors for 8.4.0.0+ * begin stream-lining discovery and polling. separating discovery functions * update test data * update test data * update test data * improve mempool discovery/polling, clean up os polling, improve state discovery, improve os definition, misc fixes to wireless sensors module * attempt to implement custom AP and client discovery and polling * code fixes * re-add ap count top graph * more fixes * more fixes * more fixes * more fixes * remove some debugging, update test data * code cleanup * code cleanup * address some scrutinizer warnings
47 lines
1.7 KiB
PHP
47 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* aruba-instant.inc.php
|
|
*
|
|
* LibreNMS mempools polling module for Aruba Instant
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* @package LibreNMS
|
|
* @link http://librenms.org
|
|
* @copyright 2019 Timothy Willey
|
|
* @author Timothy Willey <developer@timothywilley.net>
|
|
*/
|
|
echo 'aruba-instant-MEMORY-POOL: ';
|
|
|
|
$mempool_data = snmpwalk_group($device, 'aiAPSerialNum', 'AI-AP-MIB');
|
|
$mempool_data = snmpwalk_group($device, 'aiAPTotalMemory', 'AI-AP-MIB', 1, $mempool_data);
|
|
$mempool_data = snmpwalk_group($device, 'aiAPMemoryFree', 'AI-AP-MIB', 1, $mempool_data);
|
|
|
|
d_echo('$mempool_data:'.PHP_EOL);
|
|
d_echo($mempool_data);
|
|
|
|
foreach ($mempool_data as $index => $entry) {
|
|
d_echo($entry['aiAPSerialNum'].' '.$entry['aiAPTotalMemory'].' / '.$entry['aiAPMemoryFree'].PHP_EOL);
|
|
|
|
$total = $entry['aiAPTotalMemory'];
|
|
$free = $entry['aiAPMemoryFree'];
|
|
$used = $total - $free;
|
|
$perc = ($used / $total * 100);
|
|
|
|
$mempool['total'] = $total;
|
|
$mempool['used'] = $used;
|
|
$mempool['free'] = $free;
|
|
$mempool['perc'] = $perc;
|
|
} //end foreach
|