This commit is contained in:
4
main.go
4
main.go
@@ -294,8 +294,8 @@ func main() {
|
|||||||
|
|
||||||
// make sure that this event is within 10 minutes either side of the corresponding host failed event
|
// make sure that this event is within 10 minutes either side of the corresponding host failed event
|
||||||
if hostFound {
|
if hostFound {
|
||||||
unreachableStartComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * -1 * *unreachableMinutes))
|
unreachableStartComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * -1 * int64(*unreachableMinutes)))
|
||||||
unreachableEndComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * *unreachableMinutes))
|
unreachableEndComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * int64(*unreachableMinutes)))
|
||||||
|
|
||||||
if haFailedTime.Before(unreachableEndComparison) && haFailedTime.After(unreachableStartComparison) {
|
if haFailedTime.Before(unreachableEndComparison) && haFailedTime.After(unreachableStartComparison) {
|
||||||
haUnreachableEvents = append(haUnreachableEvents, h)
|
haUnreachableEvents = append(haUnreachableEvents, h)
|
||||||
|
Reference in New Issue
Block a user