diff --git a/prometheus.nomad b/prometheus.nomad index 1c1c25c..9535f28 100644 --- a/prometheus.nomad +++ b/prometheus.nomad @@ -50,6 +50,12 @@ scrape_configs: metrics_path: /v1/metrics params: format: ['prometheus'] + - job_name: 'traefik-local' + consul_sd_configs: + - server: 'consul.service.consul:8500' + services: ['traefik-local-admin','traefik-admin'] + + EOH } diff --git a/traefik-ingress.nomad b/traefik-ingress.nomad index 609d759..1c025a4 100644 --- a/traefik-ingress.nomad +++ b/traefik-ingress.nomad @@ -90,6 +90,10 @@ job "traefik-ingress" { storage = "acme.json" [certificatesResolvers.myresolver.acme.httpChallenge] entryPoint= "web" + [metrics] + [metrics.prometheus] + + EOH destination = "local/traefik.toml" env = false diff --git a/traefik-local.nomad b/traefik-local.nomad index 67544d2..8ac7dbb 100644 --- a/traefik-local.nomad +++ b/traefik-local.nomad @@ -35,7 +35,7 @@ job "traefik-local" { } service { - name = "traefi-local-admin" + name = "traefik-local-admin" port = "admin" tags = [ "traefik.enable=true", @@ -100,6 +100,9 @@ job "traefik-local" { provider = "gandiv5" delayBeforeCheck = 0 resolvers = ["173.246.100.133:53"] + [metrics] + [metrics.prometheus] + EOH