From f5aa9c3e24aec32b96be5f1382cb3265e502a815 Mon Sep 17 00:00:00 2001 From: Kent 'picat' Gruber Date: Sun, 10 Sep 2023 23:12:04 -0400 Subject: [PATCH] Remove any promscale references Project is deprecated, shouldn't be used anymore. --- Makefile | 2 +- jobs/metrics/metrics.hcl | 33 +-------------------------------- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index 1e2d06d..a793531 100644 --- a/Makefile +++ b/Makefile @@ -183,7 +183,7 @@ consul/metrics/acls: ## Create a Consul policy, role, and token to use with prom .PHONY: nomad/metrics nomad/metrics: ## Runs a Prometheus and Grafana stack on Nomad - @nomad run -var='promscale=$(PROMSCALE_ENABLED)' -var='consul_targets=[$(shell terraform output -json | jq -r '(.server_internal_ips.value + .client_internal_ips.value) | map(.+":8501") | @csv')]' -var="consul_acl_token=$(consul_acl_token)" -var="consul_lb_ip=$(shell terraform output load_balancer_ip)" jobs/metrics/metrics.hcl + @nomad run -var='consul_targets=[$(shell terraform output -json | jq -r '(.server_internal_ips.value + .client_internal_ips.value) | map(.+":8501") | @csv')]' -var="consul_acl_token=$(consul_acl_token)" -var="consul_lb_ip=$(shell terraform output load_balancer_ip)" jobs/metrics/metrics.hcl .PHONY: nomad/logs nomad/logs: ## Runs a Loki and Promtail jobs on Nomad diff --git a/jobs/metrics/metrics.hcl b/jobs/metrics/metrics.hcl index e98a3d8..389556c 100644 --- a/jobs/metrics/metrics.hcl +++ b/jobs/metrics/metrics.hcl @@ -41,11 +41,6 @@ variable "consul_cli_key" { default = "consul-cli-key.pem" } -variable "promscale" { - type = bool - default = false -} - variable "consul_targets" { type = list(string) } @@ -63,18 +58,7 @@ job "metrics" { port = "9090" connect { - sidecar_service { - proxy { - dynamic "upstreams" { - for_each = var.promscale ? [1] : [] - - content { - destination_name = "promscale" - local_bind_port = "9201" - } - } - } - } + sidecar_service {} } } @@ -163,13 +147,6 @@ scrape_configs: credentials: '${var.consul_acl_token}' static_configs: - targets: ${jsonencode(var.consul_targets)} -{{ if eq ${var.promscale} true }} -remote_write: - - url: "http://127.0.0.1:9201/write" -remote_read: - - url: "http://127.0.0.1:9201/read" - read_recent: true -{{ end }} EOH } @@ -246,14 +223,6 @@ EOH destination_name = "loki-http" local_bind_port = 3100 } - dynamic "upstreams" { - for_each = var.promscale ? [1] : [] - - content { - destination_name = "promscale" - local_bind_port = "9201" - } - } } } }