From d8e24eeb502adef91282e21a4c234f610eae062a Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Mon, 14 Aug 2023 14:58:28 +0100 Subject: [PATCH] Prometheus job config. --- services/prometheus.hcl | 166 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 services/prometheus.hcl 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 = <