update
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2024-09-16 16:03:22 +10:00
parent 508ddd73f7
commit 66543b15b6

View File

@@ -339,6 +339,12 @@ func main() {
// Sometimes host HA events can come through a few minutes after a VM restart event, so create a "fuzzy" starting time to search for host HA events
fuzzyTime := vmRestartTime.Add(time.Duration(int64(time.Minute) * int64(*fuzzyMinutes)))
log.Printf("event: %v\n", event)
if event.Vm == nil {
log.Printf("Can't read this event properly, skipping\n")
continue
}
//log.Printf("Failure event for VM '%s' restarted in cluster '%s' at %s\n", event.Vm.Name, event.ComputeResource.Name, event.CreatedTime.In(location).Format(time.ANSIC))
// filter all the disconnected events to the ones belonging to this VM