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 a57f0cb commit 19226ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/icingadb-migrate/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ type downtimeRow = struct {
Duration int64
ScheduledStartTime int64
ScheduledEndTime int64
WasStarted uint8
ActualStartTime int64
ActualStartTimeUsec uint32
ActualEndTime int64
Expand All @@ -242,6 +243,10 @@ func convertDowntimeRows(
for _, row := range idoRows {
checkpoint = row.DowntimehistoryId

if row.WasStarted == 0 {
continue
}

id := calcObjectId(env, row.Name)
typ := objectTypes[row.ObjecttypeId]
hostId := calcObjectId(env, row.Name1)
Expand Down

0 comments on commit 19226ae

Please sign in to comment.