Merge pull request #422 from prometheus/superq/example_rules

Add an example rules file
This commit is contained in:
Ben Kochie 2017-01-16 12:44:03 -05:00 committed by GitHub
commit adb8904784
1 changed files with 8 additions and 0 deletions

8
example.rules Normal file
View File

@ -0,0 +1,8 @@
# The count of CPUs per node, useful for getting CPU time as a percent of total.
instance:node_cpus:count = count(node_cpu{mode="idle"}) without (cpu,mode)
# CPU in use by CPU.
instance_cpu:node_cpu_not_idle:rate5m = sum rate(node_cpu{mode!="idle"}[5m])) without (mode)
# CPU in use by mode.
instance_mode:node_cpu:rate5m = sum rate(node_cpu[5m])) without (cpu)