Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/nomad/monitoring/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ scrape_configs:
- docs.voidlinux.org
- infradocs.voidlinux.org
- repo-fi.voidlinux.org
- repo-us.voidlinux.org
- repo-de.voidlinux.org
- sources.voidlinux.org
- terraform.voidlinux.org
- voidlinux.org
Expand Down Expand Up @@ -127,7 +127,7 @@ scrape_configs:
namespace: '{{ . }}'
# {{ end }}
relabel_configs:
# keep only services with the 'prometheus_enable=true' tag
# keep only services with the 'prometheus_enable' tag
- source_labels: ['__meta_nomad_tags']
regex: '.*,prometheus_enable,.*'
action: keep
Expand Down
15 changes: 13 additions & 2 deletions services/nomad/monitoring/vector.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,18 @@ job "vector" {
}

env {
NOMAD_HOST = "${node.unique.name}"
NOMAD_HOST = "${node.unique.name}"
VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION = "true"
}

template {
data = <<EOF
{{ range nomadService "vmlogs" }}
VMLOGS_ADDR=http://{{ .Address }}:{{ .Port }}/insert/elasticsearch/
{{ end }}
EOF
destination = "local/env"
env = true
}

template {
Expand All @@ -69,7 +80,7 @@ job "vector" {
vlogs = {
type = "elasticsearch"
inputs = ["docker"]
endpoints = ["http://vmlogs.service.consul:9428/insert/elasticsearch/"]
endpoints = ["$${VMLOGS_ADDR}"]
api_version = "v8"
compression = "gzip"
healthcheck = { enabled = false }
Expand Down
Loading