Index: includes/discovery/storage/host-resources-mib.inc.php =================================================================== --- includes/discovery/storage/host-resources-mib.inc.php (revision 6493) +++ includes/discovery/storage/host-resources-mib.inc.php (working copy) @@ -30,7 +30,7 @@ $hc = 0; $mib = 'HOST-RESOURCES-MIB'; $fstype = $storage['hrStorageType']; - $descr = $storage['hrStorageDescr']; + $descr = stripslashes($storage['hrStorageDescr']); $units = $storage['hrStorageAllocationUnits']; $deny = FALSE; Index: includes/polling/storage/wmi.inc.php =================================================================== --- includes/polling/storage/wmi.inc.php (revision 6493) +++ includes/polling/storage/wmi.inc.php (working copy) @@ -20,7 +20,14 @@ $storage_name = $disk['DeviceID'] . "\\ Label:" . $disk['VolumeName'] . " Serial Number " . strtolower($disk['VolumeSerialNumber']); $storage_id = dbFetchCell("SELECT `storage_id` FROM `storage` WHERE `storage_descr`= ?", array($storage_name)); - $rrd_filename = "storage-hrstorage-" . $storage_name .".rrd"; + if (!$storage_id) + { + dbUpdate(array('force_discovery' => '1'), 'devices', '`device_id` = ?', array($device[device_id])); + echo("New volume ".$disk['DeviceID']." found, forcing rediscovery.\n"); + continue; + } + $storage_mib = dbFetchCell("SELECT `storage_mib` FROM `storage` WHERE `storage_descr`= ?", array($storage_name)); + $rrd_filename = "storage-" . $storage_mib . "-" . $storage_name .".rrd"; $used = $disk['Size'] - $disk['FreeSpace']; $percent = round($used / $disk['Size'] * 100);