Add Prometheus 2.0 compatible example rules file - new YAML format (#739)

This commit is contained in:
zloo 2018-01-04 12:31:25 +01:00 committed by Ben Kochie
parent 477fe4665a
commit ae280f2b04

14
example-rules.yml Normal file
View file

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