|
|
@ -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)
|
|
|
|