add traefik monitoring

This commit is contained in:
vincent 2022-05-13 11:43:07 +02:00
parent a124d94d2e
commit 8c54c6eac9
3 changed files with 14 additions and 1 deletions

View File

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

View File

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

View File

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