Skip to content

Commit

Permalink
Remove any promscale references
Browse files Browse the repository at this point in the history
Project is deprecated, shouldn't be used anymore.
  • Loading branch information
picatz committed Sep 11, 2023
1 parent e2dea30 commit f5aa9c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 1 addition & 32 deletions jobs/metrics/metrics.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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 {}
}
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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"
}
}
}
}
}
Expand Down

0 comments on commit f5aa9c3

Please sign in to comment.