mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Ericsson IPOS Yaml * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Ericsson IPOS MIBs * Ericsson IPOS - Serial & Hardware detection * Ericsson IPOS - Remove mempool from overview * SSR8020 SNMPrec * Ericsson IPOS SSR 8020 Test * Delete tests/snmpsim/ericsson-ipos_ssr8020.snmpwalk * SSR8020 SNMPrec * Add storage to overview * Move to new SnmpQuery * SnmpQuery() instead of snmp_* * Delete mibs/ericsson directory * Create ERICSSON-TOP-MIB * Add files via upload
21 lines
971 B
PHP
21 lines
971 B
PHP
<?php
|
|
/*
|
|
* Copyright (c) 2024 Rudy Broersma <tozz@kijkt.tv>
|
|
*
|
|
* 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. Please see LICENSE.txt at the top level of
|
|
* the source code distribution for details.
|
|
*/
|
|
|
|
if ($storage['storage_type'] === "eriRouterSRStorage") {
|
|
$data_used = SnmpQuery::hideMib()->get('ERICSSON-ROUTER-SYS-RESOURCES-MIB::eriRouterSRStorageUtilization.'.$storage['storage_index'])->value();
|
|
$data_size = SnmpQuery::hideMib()->get('ERICSSON-ROUTER-SYS-RESOURCES-MIB::eriRouterSRStorageSize.'.$storage['storage_index'])->value();
|
|
|
|
$storage['size'] = $data_size;
|
|
$storage['used'] = round(($storage['storage_size'] / 100) * $data_used, 0);
|
|
$storage['free'] = round($storage['storage_size'] - $used, 0);
|
|
$storage['units'] = 1024;
|
|
}
|