diff --git a/services/prometheus.hcl b/services/prometheus.hcl new file mode 100644 index 0000000..7b6863e --- /dev/null +++ b/services/prometheus.hcl @@ -0,0 +1,166 @@ +job "prometheus" { + datacenters = ["alo"] + type = "service" + + meta { + version = "2" + } + + group "monitoring" { + count = 1 + + network { + port "http" { + #host_network = "tailscale" + static = "9090" + } + } + + task "prometheus" { + driver = "docker" + + service { + name = "prometheus" + port = "http" + tags = [ + "traefik.enable=true", + "traefik.http.routers.prometheus.entryPoints=websecure", + ] + + check { + type = "http" + path = "/-/healthy" + name = "http" + interval = "5s" + timeout = "2s" + } + } + + # main configuration file + template { + data = <