mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@2234 61d68cd4-352d-0410-923a-c4978735b2b8
36 lines
787 B
PHP
Executable File
36 lines
787 B
PHP
Executable File
<?php
|
|
|
|
echo("Storage : ");
|
|
|
|
global $valid_storage;
|
|
|
|
include_dir("includes/discovery/storage");
|
|
|
|
|
|
### Remove storage which weren't redetected here
|
|
|
|
$sql = "SELECT * FROM `storage` WHERE `device_id` = '".$device['device_id']."'";
|
|
$query = mysql_query($sql);
|
|
|
|
if ($debug) { print_r ($valid_storage); }
|
|
|
|
while ($test_storage = mysql_fetch_assoc($query))
|
|
{
|
|
$storage_index = $test_storage['storage_index'];
|
|
$storage_mib = $test_storage['storage_mib'];
|
|
if ($debug) { echo($storage_index . " -> " . $storage_mib . "\n"); }
|
|
|
|
if (!$valid_storage[$storage_mib][$storage_index])
|
|
{
|
|
echo("-");
|
|
mysql_query("DELETE FROM `storage` WHERE storage_id = '" . $test_storage['storage_id'] . "'");
|
|
}
|
|
|
|
unset($storage_index); unset($storage_mib);
|
|
}
|
|
|
|
unset($valid_storage);
|
|
echo("\n");
|
|
|
|
?>
|