Added netapp storage support and restructured storage files/dir

This commit is contained in:
laf
2015-05-11 14:28:54 +01:00
parent 8a955f760b
commit 9614a203ca
4 changed files with 44 additions and 1 deletions
@@ -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'];