Skip to content

Commit

Permalink
cmd/icingadb-migrate: ignore icinga_downtimehistory#was_started=0 rows
Browse files Browse the repository at this point in the history
Such appear e.g. for scheduled but never triggered flexible Downtimes.
Not triggered = no events.
  • Loading branch information
Al2Klimov committed Jul 27, 2023
1 parent 5ea6831 commit 2841b86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/icingadb-migrate/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ type downtimeRow = struct {
Duration int64
ScheduledStartTime sql.NullInt64
ScheduledEndTime int64
WasStarted uint8
ActualStartTime int64
ActualStartTimeUsec uint32
ActualEndTime int64
Expand All @@ -246,7 +247,7 @@ func convertDowntimeRows(
for _, row := range idoRows {
checkpoint = row.DowntimehistoryId

if !row.ScheduledStartTime.Valid {
if !row.ScheduledStartTime.Valid || row.WasStarted == 0 {
continue
}

Expand Down

0 comments on commit 2841b86

Please sign in to comment.