Files
librenms-librenms/includes/polling/storage/ericsson-ipos.inc.php
Tozz d456e78109 YAMLized version of previous PR for Ericsson SSR 80xx routers (#15834)
* 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
2024-02-28 14:42:50 -06:00

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;
}