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

offset keyword not working in recorded rules or alert rules #1223

Closed
jamessanford opened this Issue Nov 15, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@jamessanford
Copy link
Contributor

jamessanford commented Nov 15, 2015

Having problems with "offset" in recorded rules and alerts.

Full expression works in templates and expression browser, but when a recorded rule or alert rule, "offset" gets ignored.

For example, with these two rules. Evaluating the two new timeseries in the browser, they always report the same number -- and on the status page rule list there's no mention of "offset"

net_total_rate = sum(rate(node_network_receive_bytes{device="eth0"}[5m])) * 8
net_total_rate_offset = sum(rate(node_network_receive_bytes{device="eth0"}[5m] offset 1m)) * 8

Screenshot of status page, note missing "offset" keyword on the right hand side:

prom_1_rules


Screenshot of first rule:

prom_2

Screenshot of offset rule, note that the value is reported as the same, it should not be:

prom_3


Evaluating the expression in the browser itself works, and the "offset" version does report the offset:

prom_4

prom_5


The above examples use "offset 1m", but the same issue persists with 5m, 30m, ... the recorded rules don't use the offset.
(fyi this test prometheus instance has scrape/evaluation intervals of 5s)

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.