Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
/*
* 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.
* @package LibreNMS
2021-02-09 00:29:04 +01:00
* @link https://www.librenms.org
* @copyright 2018 ACL
* @author Abel Laura <abel.laura@gmail.com>
*/
2020-09-22 02:52:01 +02:00
if (! is_array($storage_cache['ddos-storage'])) {
$storage_cache['ddos-storage'] = snmpwalk_cache_oid($device, 'fileSystemSpaceTable', null, 'DATA-DOMAIN-MIB', 'datadomain');
d_echo($storage_cache);
}
foreach ($storage_cache['ddos-storage'] as $fsentry) {
2020-09-22 02:52:01 +02:00
if ($fsentry['fileSystemResourceName'] == '/data: post-comp') {
$storage['units'] = 1073741824;
$storage['size'] = $fsentry['fileSystemSpaceSize'] * $storage['units'];
$storage['free'] = $fsentry['fileSystemSpaceAvail'] * $storage['units'];
$storage['used'] = $fsentry['fileSystemSpaceUsed'] * $storage['units'];
}
}