chore: backup infrastructure configurations [skip ci]
This commit is contained in:
70
nomad_backup/node-exporter_backup.hcl
Normal file
70
nomad_backup/node-exporter_backup.hcl
Normal file
@@ -0,0 +1,70 @@
|
||||
job "node-exporter_backup" {
|
||||
region = "global"
|
||||
datacenters = ["dc1"]
|
||||
type = "system"
|
||||
node_pool = "backup"
|
||||
constraint {
|
||||
attribute = "${attr.kernel.name}"
|
||||
value = "linux"
|
||||
}
|
||||
|
||||
group "node-exporter" {
|
||||
count = 1
|
||||
|
||||
restart {
|
||||
attempts = 3
|
||||
delay = "20s"
|
||||
mode = "delay"
|
||||
}
|
||||
|
||||
task "node-exporter" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
#image = "anzevalher/node-exporter"
|
||||
image = "prom/node-exporter"
|
||||
|
||||
force_pull = true
|
||||
|
||||
args = ["--collector.cpu","--collector.filesystem","--collector.meminfo","--collector.thermal_zone","--collector.disable-defaults",]
|
||||
volumes = [
|
||||
"/proc:/host/proc",
|
||||
"/sys:/host/sys",
|
||||
"/:/rootfs",
|
||||
]
|
||||
|
||||
port_map {
|
||||
http = 9100
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "node-exporter"
|
||||
|
||||
tags = [
|
||||
"metrics",
|
||||
]
|
||||
|
||||
port = "http"
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
path = "/metrics/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 20
|
||||
memory = 20
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
static = "9100"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user