Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/monitor/sqsevent/sqs-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func (m SQSMonitor) isInstanceManaged(instanceID string) (bool, error) {
return false, err
}
if len(asgs.AutoScalingInstances) == 0 {
log.Debug().Str("instance_id", instanceID).Msg("Did not find an Auto Scaling Group for the given instance id")
return false, nil
}
asgName := asgs.AutoScalingInstances[0].AutoScalingGroupName
Expand All @@ -214,5 +215,10 @@ func (m SQSMonitor) isInstanceManaged(instanceID string) (bool, error) {
return true
})

if !isManaged {
log.Debug().
Str("instance_id", instanceID).
Msgf("The instance's Auto Scaling Group is not tagged as managed with tag key: %s", NTHManagedASG)
}
return isManaged, err
}