Skip to content

Instantly share code, notes, and snippets.

@benley
Last active December 15, 2016 19:56
Show Gist options
  • Save benley/83e27cfc2f3b9bb4e0ca24f6555f64de to your computer and use it in GitHub Desktop.
Save benley/83e27cfc2f3b9bb4e0ca24f6555f64de to your computer and use it in GitHub Desktop.
# What's the difference in meaning between these two prometheus rules?
query_version_a =
(
sum
by (source)
(
(
(
rate(cpu_user_seconds_total[3m])
)
+
(
rate(cpu_system_seconds_total[3m])
)
)
-
cpus_limit
)
) > 0
query_version_b =
sum
by (source)
(
(
(
rate(cpu_user_seconds_total[3m])
)
+
(
rate(cpu_system_seconds_total[3m])
)
)
-
cpus_limit
) > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment