Commit cc4f007d authored by ale's avatar ale
Browse files

Condense systemd unit evaluation into a single metric

Part of the optimization work on issue #51.
parent af456f53
......@@ -8,8 +8,6 @@ groups:
- record: job:up:fraction
expr: job:up:count / job:total:count
- record: node_systemd_unit_presence
expr: max(node_systemd_unit_state) by (host,name)
- record: node_systemd_unit_ok
expr: sum(node_systemd_unit_state{state="active"}) by (host,name)
......@@ -22,7 +20,7 @@ groups:
# float_services that have at least one failing systemd unit.
# The result metric has both float_service and service labels.
- record: service:presence_by_host
expr: label_replace(node_systemd_unit_presence,"service","$1","name","(.*)") * on (service,host) group_right global:svcmap
expr: label_replace(max(node_systemd_unit_state) by (host,name),"service","$1","name","(.*)") * on (service,host) group_right global:svcmap
- record: service:ok_by_host
expr: label_replace(node_systemd_unit_ok,"service","$1","name","(.*)") * on(service,host) group_right global:svcmap
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment