fix: Stop logging when a vm no longer is on the host being polled (#5346)

This commit is contained in:
Neil Lathwood
2017-01-08 18:53:47 +00:00
committed by Tony Murray
parent e9827bb166
commit a6c510226e

View File

@@ -79,7 +79,9 @@ foreach ($db_info_list as $db_info) {
if ($vm_info[$property] != $db_info[$property]) {
// FIXME - this should loop building a query and then run the query after the loop (bad geert!)
dbUpdate(array($property => $vm_info[$property]), 'vminfo', '`id` = ?', array($db_info['id']));
log_event($db_info['vmwVmDisplayName'].' ('.preg_replace('/^vmwVm/', '', $property).') -> '.$vm_info[$property], $device);
if ($db_info['vmwVmDisplayName'] != null) {
log_event($db_info['vmwVmDisplayName'] . ' (' . preg_replace('/^vmwVm/', '', $property) . ') -> ' . $vm_info[$property], $device);
}
}
}
}//end foreach