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

Vmalert: adjust time param for datasource queries according to evaluationInterval #1257

Merged
merged 2 commits into from Apr 30, 2021

Conversation

hagen1778
Copy link
Collaborator

@hagen1778 hagen1778 commented Apr 30, 2021

With this change, vmalert will start to use rule's evaluation interval
for truncating the time param. This is mostly needed to produce consistent
time series with timestamps unaffected by vmalert start time. Now, timestamp
becomes predictable.
Additionally, adjustment is similar to what Grafana does for plotting range graphs.
Hence, recording rule series and recording rule expression plotted in grafana
suppose to become similar in most of cases.

#1232

With this change, vmalert will start to use rule's evaluation interval
for truncating the `time` param. This is mostly needed to produce consistent
time series with timestamps unaffected by vmalert start time. Now, timestamp
becomes predictable.
Additionally, adjustment is similar to what Grafana does for plotting range graphs.
Hence, recording rule series and recording rule expression plotted in grafana
suppose to become similar in most of cases.
@valyala valyala merged commit f3a0482 into master Apr 30, 2021
@valyala valyala deleted the vmalert-1232 branch April 30, 2021 06:46
@valyala
Copy link
Collaborator

valyala commented Apr 30, 2021

It would be great passing step query arg to datasource as evaluation_interval if -datasource.queryStep command-line flag isn't set.

@hagen1778
Copy link
Collaborator Author

Makes sense. Will make a follow-up PR.

valyala pushed a commit that referenced this pull request Apr 30, 2021
…luationInterval` (#1257)

* Simplify arguments list for fn `queryDataSource` to improve readbility

* vmalert: adjust `time` param according to rule evaluation interval

With this change, vmalert will start to use rule's evaluation interval
for truncating the `time` param. This is mostly needed to produce consistent
time series with timestamps unaffected by vmalert start time. Now, timestamp
becomes predictable.
Additionally, adjustment is similar to what Grafana does for plotting range graphs.
Hence, recording rule series and recording rule expression plotted in grafana
suppose to become similar in most of cases.
@hagen1778
Copy link
Collaborator Author

@valyala please see #1258

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.

None yet

2 participants