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
vmalert: add "evaluation_offset" option to group configuration #3409
Comments
@hagen1778 I can take a look at this |
@stevenbeaullieu just wanted to clarify here. From my understanding |
@spotifyprism Yes, but you could also keep queryTimeAlignment as true and it would write at the top of the interval and evaluate at the offset. queryTimeAlignment would keep doing what it's doing and this new configuration would just override when the rule is evaluated. In hindsight our original problem would likely have been fixed by setting queryTimeAlignment to false, but we weren't sure about other repercussions of that. I'm guessing there would have been none, but didn't have the appetite to change it at the time. For the original problem, we no longer have recording rules with an interval > 5m, so we haven't had an issue with staleness anymore. I could still see such a configuration being useful to mirror the capability with vmagent. |
yeah sounds good, queryTimeAlignment & rule evaluation are two separate mutually exclusive problems. |
Sounds weird but true I think.
Update:
|
I think it will be not In other words: at If user disables |
Adds `eval_offset` attribute for Groups. If specified, Group will be evaluated at the exact time offset on the range of [0...evaluationInterval]. The setting might be useful for cron-like rules which must be evaluated at specific moments of time. #3409 Signed-off-by: Haley Wang <pipilong.25@gmail.com> Co-authored-by: hagen1778 <roman@victoriametrics.com>
@stevenbeaullieu the support of |
Adds `eval_offset` attribute for Groups. If specified, Group will be evaluated at the exact time offset on the range of [0...evaluationInterval]. The setting might be useful for cron-like rules which must be evaluated at specific moments of time. #3409 Signed-off-by: Haley Wang <pipilong.25@gmail.com> Co-authored-by: hagen1778 <roman@victoriametrics.com> (cherry picked from commit 45c0e4b)
The Closing the feature request as done. |
Is your feature request related to a problem? Please describe.
For recording rules with a high interval, say > 5m, it would be desirable to be able to specify when they evaluate. One issue we had was with a 60m interval, it was evaluating toward the end of the hour, but writing with a timestamp at the top of the hour. This was excluding it from federation because of staleness. If we could give it an evaluation-offset of 2m or something like that, that would make sure it evaluates and writes the result within the first 5m of the hour so it is included in Federation. Other use cases are recording rules that run once every 24 hours to produce metrics for other things to consume. Since the metrics need to be available before what depends on them, it makes sense to be able to specify when they run rather than let it be random.
Describe the solution you'd like
Add a configuration option to group configurations called "evaluation_offset" that works similar to the "scrape_offset" for vmagent scrape configurations. Instead of an algorithm choosing when the rules run, they would run at the specified offset within their interval. So a 1m interval with an evaluation_offset of 0s would run at the top of the minute, or a 60m interval with an evaluation_offset of 2m would run at 2m after the hour every hour. This would be paired with the existing
-datasource.queryTimeAlignment
to either keep the timestamp at the top of the interval, or have the timestamp match the offset exactly if alignment is disabled.Describe alternatives you've considered
We've worked around this for now, but could simplify some solutions with this ability.
Additional context
N/A
The text was updated successfully, but these errors were encountered: