mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Added netapp storage support and restructured storage files/dir
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
// HOST-RESOURCES-MIB - Storage Objects
|
||||
|
||||
if (!is_array($storage_cache['hrstorage']))
|
||||
{
|
||||
$storage_cache['hrstorage'] = snmpwalk_cache_oid($device, "hrStorageEntry", NULL, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES");
|
||||
if ($debug) { print_r($storage_cache); }
|
||||
}
|
||||
|
||||
$entry = $storage_cache['hrstorage'][$storage[storage_index]];
|
||||
|
||||
$storage['units'] = $entry['hrStorageAllocationUnits'];
|
||||
$storage['used'] = $entry['hrStorageUsed'] * $storage['units'];
|
||||
$storage['size'] = $entry['hrStorageSize'] * $storage['units'];
|
||||
$storage['free'] = $storage['size'] - $storage['used'];
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
if (!is_array($storage_cache['netapp-storage'])) {
|
||||
$storage_cache['hrstorage'] = snmpwalk_cache_oid($device, "dfEntry", NULL, "NETAPP-MIB");
|
||||
if ($debug) {
|
||||
print_r($storage_cache);
|
||||
}
|
||||
}
|
||||
|
||||
$entry = $storage_cache['netapp-storage'][$storage[storage_index]];
|
||||
|
||||
$storage['units'] = 1024;
|
||||
$storage['used'] = $entry['hrStorageUsed'] * $storage['units'];
|
||||
$storage['size'] = $entry['hrStorageSize'] * $storage['units'];
|
||||
$storage['free'] = $storage['size'] - $storage['used'];
|
||||
Reference in New Issue
Block a user