mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated DataDomain MIB and added Storage support (#9270)
* Updated DataDomain MIB, Added DataDomain Storage poller and discovery * Fixed issues pre-commit issues * Removed extra blank lines * Make polling less redudant * Remove blank line * Remove device os detection since it's not needed. Add test data for DataDomain * Added json test file
This commit is contained in:
29
includes/discovery/storage/datadomain.inc.php
Normal file
29
includes/discovery/storage/datadomain.inc.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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
|
||||
* @link http://librenms.org
|
||||
* @copyright 2018 ACL
|
||||
* @author Abel Laura <abel.laura@gmail.com>
|
||||
*/
|
||||
|
||||
$ddos_storage = snmpwalk_cache_oid($device, 'fileSystemSpaceTable', null, 'DATA-DOMAIN-MIB', 'datadomain');
|
||||
if (is_array($ddos_storage)) {
|
||||
foreach ($ddos_storage as $storage) {
|
||||
$index = $storage['fileSystemResourceIndex'];
|
||||
$fstype = $storage['fileSystemResourceTier'];
|
||||
$descr = $storage['fileSystemResourceName'];
|
||||
$units = 1073741824;
|
||||
$total = $storage['fileSystemSpaceSize'] * $units;
|
||||
$used = $storage['fileSystemSpaceUsed'] * $units;
|
||||
if ($descr == "/data: post-comp") {
|
||||
discover_storage($valid_storage, $device, $index, $fstype, 'datadomain', $descr, $total, $units, $used);
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($fstype, $descr, $total, $used, $units, $ddos_storage);
|
Reference in New Issue
Block a user