2018-04-22 12:39:44 +00:00
|
|
|
resource "docker_container" "nodeexporter" {
|
2018-02-09 20:56:31 +00:00
|
|
|
name = "nodeexporter"
|
|
|
|
image = "${docker_image.nodeexporter.latest}"
|
|
|
|
|
|
|
|
volumes {
|
|
|
|
host_path = "/proc"
|
|
|
|
container_path = "/host/proc"
|
|
|
|
}
|
|
|
|
|
|
|
|
volumes {
|
|
|
|
host_path = "/sys"
|
|
|
|
container_path = "/host/sys"
|
|
|
|
}
|
|
|
|
|
|
|
|
volumes {
|
|
|
|
host_path = "/"
|
|
|
|
container_path = "/rootfs"
|
|
|
|
read_only = true
|
|
|
|
}
|
|
|
|
|
|
|
|
command = [
|
|
|
|
"--path.procfs=/host/proc",
|
|
|
|
"--path.sysfs=/host/sys",
|
|
|
|
"--collector.filesystem.ignored-mount-points=\"^/(sys|proc|dev|host|etc)($$|/)\"",
|
|
|
|
]
|
|
|
|
|
2018-06-04 14:10:58 +00:00
|
|
|
networks = ["${docker_network.monitoring.id}"]
|
|
|
|
|
2018-02-09 20:56:31 +00:00
|
|
|
restart = "unless-stopped"
|
|
|
|
destroy_grace_seconds = 10
|
|
|
|
must_run = true
|
|
|
|
}
|