From 3ae75ce54f79e7cf44bcafd6b7cddb7a442a0973 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 17 Apr 2024 10:13:09 +0200 Subject: [PATCH] Add protocol = http for loki and prometheus services in the mesh --- example/monitoring-agent.nomad.hcl | 3 +++ example/monitoring-services.nomad.hcl | 9 +++++++++ variables.yml | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/example/monitoring-agent.nomad.hcl b/example/monitoring-agent.nomad.hcl index d1ea8b1..616ecea 100644 --- a/example/monitoring-agent.nomad.hcl +++ b/example/monitoring-agent.nomad.hcl @@ -63,6 +63,9 @@ job "monitoring-agent" { local_bind_port = 3100 # Work arround, see https://github.com/hashicorp/nomad/issues/18538 destination_type = "service" + config { + protocol = "http" + } } } } diff --git a/example/monitoring-services.nomad.hcl b/example/monitoring-services.nomad.hcl index b4177a9..8f71f6a 100644 --- a/example/monitoring-services.nomad.hcl +++ b/example/monitoring-services.nomad.hcl @@ -2189,6 +2189,9 @@ _EOT local_bind_port = 3100 # Work arround, see https://github.com/hashicorp/nomad/issues/18538 destination_type = "service" + config { + protocol = "http" + } } } } @@ -2412,12 +2415,18 @@ _EOT local_bind_port = 3100 # Work arround, see https://github.com/hashicorp/nomad/issues/18538 destination_type = "service" + config { + protocol = "http" + } } upstreams { destination_name = "prometheus" local_bind_port = 9090 # Work arround, see https://github.com/hashicorp/nomad/issues/18538 destination_type = "service" + config { + protocol = "http" + } } } } diff --git a/variables.yml b/variables.yml index 28f3249..431bd2f 100644 --- a/variables.yml +++ b/variables.yml @@ -301,6 +301,8 @@ monitoring: # Connect to loki through the service mesh - destination_name: 'loki[[ .consul.suffix ]]' local_bind_port: 3100 + config: + protocol: http vault: # Vault policies to attach to the task. # Note : vector can expose its metrics with mTLS natively, so we do not add a metrics_proxy task @@ -386,8 +388,12 @@ monitoring: local_bind_port: 5432 - destination_name: loki[[ .consul.suffix ]] local_bind_port: 3100 + config: + protocol: http - destination_name: prometheus[[ .consul.suffix ]] local_bind_port: 9090 + config: + protocol: http # Volumes for data persistence volumes: data: @@ -466,6 +472,8 @@ monitoring: # Connect to loki with the service mesh - destination_name: loki[[ .consul.suffix ]] local_bind_port: 3100 + config: + protocol: http # Volumes for data persistence volumes: # The nomad volume should expose the Nomad alloc dir (eg /opt/nomad/data/alloc) where vector will be able