mimir icon indicating copy to clipboard operation
mimir copied to clipboard

mimir-continuous-test: allow observation windows to be configured

Open ldvc opened this issue 8 months ago • 1 comments

Is your feature request related to a problem? Please describe.

In Mimir continous-test, the function getQueryTimeRanges is responsible for selecting observation windows to validate the behavior of the targeted Mimir cluster.

These time windows are more or less fixed in the code:

  • the last one hour if MaxQueryAge allows it
  • the last 24 hours if MaxQueryAge allows it
  • the hour between now-23h and now-24h if MaxQueryAge allows it
  • a random window between now and MaxQueryAge

This arbitrary selection can lead to misunderstandings when setting up the Mimir continuous-test. In addition, the random window could lead to "flapping" alerts, which the user may not want.

Describe the solution you'd like

Do you think users should be able to customize these windows to better suit their needs and reflect their usage?

This could be done using an additional configuration flag for example something like this would replicate the current behavior:

query-windows fix:now,1h;fix:now,24h;fix:23h,24h;rand:now,maxqueryage

Describe alternatives you've considered

None.

Additional context

I open this issue for discussion. If the outcome is positive, I could take care of the PR.

ldvc avatar Jun 21 '24 13:06 ldvc