prometheus: include url as a label

for coverage maps
pull/157/head
Mike Lang 5 years ago
parent 9a1369cf98
commit d76f38bf20

@ -33,15 +33,18 @@ local services = [
[ [
{ {
local hosts = hosts_by_scheme[scheme], local hosts = hosts_by_scheme[scheme],
local url = hosts[host][0],
local role = hosts[host][1],
job_name: "%s-%s" % [scheme, service], job_name: "%s-%s" % [scheme, service],
metrics_path: "/metrics/%s" % service, metrics_path: "/metrics/%s" % service,
scheme: scheme, scheme: scheme,
static_configs: [ static_configs: [
{ {
targets: [hosts[host][0]], targets: [url],
labels: { labels: {
instance: host, instance: host,
role: hosts[host][1], url: url,
role: role,
service: service, service: service,
}, },
} for host in std.objectFields(hosts) } for host in std.objectFields(hosts)

Loading…
Cancel
Save