diff --git a/monitoring/prometheus.jsonnet b/monitoring/prometheus.jsonnet index 9792147..ff1887f 100644 --- a/monitoring/prometheus.jsonnet +++ b/monitoring/prometheus.jsonnet @@ -33,15 +33,18 @@ local services = [ [ { local hosts = hosts_by_scheme[scheme], + local url = hosts[host][0], + local role = hosts[host][1], job_name: "%s-%s" % [scheme, service], metrics_path: "/metrics/%s" % service, scheme: scheme, static_configs: [ { - targets: [hosts[host][0]], + targets: [url], labels: { instance: host, - role: hosts[host][1], + url: url, + role: role, service: service, }, } for host in std.objectFields(hosts)