2018-10-17 12:02:06 -04:00
|
|
|
<?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
|
2019-01-22 18:33:36 -05:00
|
|
|
* @copyright 2019 ACL
|
2018-10-17 12:02:06 -04:00
|
|
|
* @author Abel Laura <abel.laura@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
$ddos_storage = snmpwalk_cache_oid($device, 'fileSystemSpaceTable', null, 'DATA-DOMAIN-MIB', 'datadomain');
|
|
|
|
if (is_array($ddos_storage)) {
|
2019-01-22 18:33:36 -05:00
|
|
|
foreach ($ddos_storage as $index => $storage) {
|
2018-10-17 12:02:06 -04:00
|
|
|
$fstype = $storage['fileSystemResourceTier'];
|
|
|
|
$descr = $storage['fileSystemResourceName'];
|
|
|
|
$units = 1073741824;
|
|
|
|
$total = $storage['fileSystemSpaceSize'] * $units;
|
|
|
|
$used = $storage['fileSystemSpaceUsed'] * $units;
|
2020-09-22 02:52:01 +02:00
|
|
|
if ($descr == '/data: post-comp') {
|
2018-10-17 12:02:06 -04:00
|
|
|
discover_storage($valid_storage, $device, $index, $fstype, 'datadomain', $descr, $total, $units, $used);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($fstype, $descr, $total, $used, $units, $ddos_storage);
|