overview dashboard: Look up services by 'service' label, not job

Job can't be repeated across scrape jobs, service can
pull/157/head
Mike Lang 5 years ago
parent ac98d67853
commit e1993c6a79

@ -32,7 +32,7 @@ local service_status_table = {
type: "table",
targets: [
{
expr: 'sum(up{job="%s", role=~"%s"}) by (instance)' % [services[i], roles_for_service[services[i]]],
expr: 'sum(up{service="%s", role=~"%s"}) by (instance)' % [services[i], roles_for_service[services[i]]],
intervalFactor: 1,
format: "table",
refId: refId(i),

@ -42,6 +42,7 @@ local services = [
labels: {
instance: host,
role: hosts[host][1],
service: service,
},
} for host in std.objectFields(hosts)
],

Loading…
Cancel
Save