2022-07-25 15:49:29 -07:00
|
|
|
resource "nomad_job" "exporters" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/exporters.nomad")
|
|
|
|
}
|
2022-03-03 09:37:49 -08:00
|
|
|
|
|
|
|
resource "nomad_job" "prometheus" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/prometheus.nomad")
|
|
|
|
}
|
2022-03-12 10:07:52 -08:00
|
|
|
|
|
|
|
resource "nomad_job" "grafana" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
2022-07-21 15:54:05 -07:00
|
|
|
jobspec = templatefile("${path.module}/grafana.nomad", {
|
2022-11-02 12:32:27 -07:00
|
|
|
module_path = path.module
|
2022-07-21 15:54:05 -07:00
|
|
|
})
|
2022-03-12 10:07:52 -08:00
|
|
|
}
|
2022-03-14 15:58:47 -07:00
|
|
|
|
|
|
|
resource "consul_config_entry" "prometheus_intent" {
|
|
|
|
name = "prometheus"
|
|
|
|
kind = "service-intentions"
|
|
|
|
|
|
|
|
config_json = jsonencode({
|
|
|
|
Sources = [
|
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "grafana"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
|
|
|
]
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
# resource "consul_config_entry" "envoy_prometheus_bind" {
|
|
|
|
# name = "global"
|
|
|
|
# kind = "proxy-defaults"
|
|
|
|
#
|
|
|
|
# config_json = jsonencode({
|
|
|
|
# "envoy_prometheus_bind_addr" = "0.0.0.0:9102"
|
|
|
|
# })
|
|
|
|
# }
|