Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alerts: add optional triggered for durations #199

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

mattcarmody
Copy link
Contributor

@mattcarmody mattcarmody commented Jan 3, 2024

Add support for optional triggered for durations: warning duration, critical duration and no data duration.

I didn't look into preventing it from being added to the metric condition resource, I assume it would be fairly messy because they share so much code.

@mattcarmody mattcarmody marked this pull request as ready for review January 3, 2024 04:54
@mattcarmody mattcarmody requested review from ltyson and lambcode January 3, 2024 04:54
@mattcarmody mattcarmody changed the title add triggered for durations to alerts alerts: add optional triggered for durations Jan 3, 2024
Copy link
Contributor

@lambcode lambcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing all the bugs!

@@ -68,7 +68,7 @@ func getCompositeAlertFromUnifiedConditionResourceData(compositeAlertIn *client.
if subAlertIn.Expression.NoDataDurationMs != nil {
subAlertExpressionMap["no_data_duration_ms"] = subAlertIn.Expression.NoDataDurationMs
}
subAlerts = append(subAlerts, map[string]interface{}{})
subAlerts = append(subAlerts, subAlertExpressionMap)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops. Good catch

@mattcarmody mattcarmody merged commit ae8faf0 into main Jan 3, 2024
5 checks passed
@mattcarmody mattcarmody deleted the carmody-triggered-for branch January 3, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants