nebula/monitoring/prometheus.tf

43 lines
910 B
Terraform
Raw Normal View History

2018-04-22 12:39:44 +00:00
resource "docker_container" "prometheus" {
2018-02-09 20:56:31 +00:00
name = "prometheus"
image = "${docker_image.prometheus.latest}"
# prometheus:prometheus
user = "985:983"
ports {
internal = 9090
external = 9090
ip = "${var.ips["eth0"]}"
}
2018-04-05 09:16:40 +00:00
ports {
internal = 9090
external = 9090
ip = "${var.ips["tun0"]}"
}
2018-02-09 20:56:31 +00:00
command = ["--config.file=/etc/prometheus/prometheus.yml"]
volumes {
host_path = "/mnt/xwing/data/prometheus"
container_path = "/prometheus"
}
upload {
content = "${file("${path.module}/config/prometheus.yml")}"
file = "/etc/prometheus/prometheus.yml"
}
links = [
"${docker_container.nodeexporter.name}",
"${docker_container.cadvisor.name}",
2018-03-07 20:12:21 +00:00
"${docker_container.speedtest.name}",
2018-02-17 23:34:09 +00:00
"${var.links-traefik}",
2018-02-09 20:56:31 +00:00
]
restart = "unless-stopped"
destroy_grace_seconds = 10
must_run = true
}