Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upoffset not honored with recording rules #1234
Comments
This comment has been minimized.
This comment has been minimized.
|
Dupe of #1223 You should be using the |
brian-brazil
closed this
Nov 23, 2015
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil thanks for the tip and the quick update. |
This comment has been minimized.
This comment has been minimized.
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
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.
xbglowx commentedNov 23, 2015
I have the following recording rules
node_cpu_usage_user_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='user'}) - sum(node_cpu{tags=~',prometheus,',mode='user'} offset 15s)) / 150) * 100 node_cpu_usage_nice_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='nice'}) - sum(node_cpu{tags=~',prometheus,',mode='nice'} offset 15s)) / 150) * 100 node_cpu_usage_iowait_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='iowait'}) - sum(node_cpu{tags=~',prometheus,',mode='iowait'} offset 15s)) / 150) * 100 node_cpu_usage_idle_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='idle'}) - sum(node_cpu{tags=~',prometheus,',mode='idle'} offset 15s)) / 150) * 100 node_cpu_usage_softirq_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='softirq'}) - sum(node_cpu{tags=~',prometheus,',mode='softirq'} offset 15s)) / 150) * 100 node_cpu_usage_system_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='system'}) - sum(node_cpu{tags=~',prometheus,',mode='system'} offset 15s)) / 150) * 100 node_cpu_usage_irq_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='irq'}) - sum(node_cpu{tags=~',prometheus,',mode='irq'} offset 15s)) / 150) * 100 node_cpu_usage_guest_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='guest'}) - sum(node_cpu{tags=~',prometheus,',mode='quest'} offset 15s)) / 150) * 100 node_cpu_usage_steal_prometheus = ((sum(node_cpu{tags=~',prometheus,',mode='steal'}) - sum(node_cpu{tags=~',prometheus,',mode='steal'} offset 15s)) / 150) * 100A Prometheus reload works fine, but the status doesn't show 'offset 15s'. So the end recording rule ends up being:
node_cpu_usage_user_prometheus = ((sum(node_cpu{mode="user",tags=~",prometheus,"}) - sum(node_cpu{mode="user",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_nice_prometheus = ((sum(node_cpu{mode="nice",tags=~",prometheus,"}) - sum(node_cpu{mode="nice",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_iowait_prometheus = ((sum(node_cpu{mode="iowait",tags=~",prometheus,"}) - sum(node_cpu{mode="iowait",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_idle_prometheus = ((sum(node_cpu{mode="idle",tags=~",prometheus,"}) - sum(node_cpu{mode="idle",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_softirq_prometheus = ((sum(node_cpu{mode="softirq",tags=~",prometheus,"}) - sum(node_cpu{mode="softirq",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_system_prometheus = ((sum(node_cpu{mode="system",tags=~",prometheus,"}) - sum(node_cpu{mode="system",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_irq_prometheus = ((sum(node_cpu{mode="irq",tags=~",prometheus,"}) - sum(node_cpu{mode="irq",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_guest_prometheus = ((sum(node_cpu{mode="guest",tags=~",prometheus,"}) - sum(node_cpu{mode="quest",tags=~",prometheus,"})) / 150) * 100 node_cpu_usage_steal_prometheus = ((sum(node_cpu{mode="steal",tags=~",prometheus,"}) - sum(node_cpu{mode="steal",tags=~",prometheus,"})) / 150) * 100I am running prometheus version 0.15.1