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

End alignment evaluation in alert queries can be incorrect if the offset is zero #465

Open
cwbriones opened this issue Nov 4, 2020 · 1 comment

Comments

@cwbriones
Copy link
Contributor

cwbriones commented Nov 4, 2020

When we check if an alert is in the firing state, we validate that

  1. there is data and
  2. the data isn't stale.

(2) essentially means that the timestamp of the most recent datapoint should be less than a period away from the end of the query window.

However, when a query specifies end-alignment, the most recent timestamp is always now - aggregationPeriod which is exactly one period away if the query offset is set to zero. This means with this configuration we'll always mark an end-aligned alert as OK even when it should be firing.

In practice, queryOffset is always >=1 so this problem doesn't occur, but it still may be worth fixing if there scenarios where we would want to set the offset to zero.

@cwbriones
Copy link
Contributor Author

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

No branches or pull requests

1 participant