Reatart failing services
Restart services that fail checks
This commit is contained in:
parent
f2f415aeac
commit
64a085ef80
@ -5,6 +5,7 @@ module "minitor" {
|
|||||||
image = "iamthefij/minitor-go:1.4.1"
|
image = "iamthefij/minitor-go:1.4.1"
|
||||||
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
|
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
|
||||||
service_port = 8080
|
service_port = 8080
|
||||||
|
service_check = null
|
||||||
use_wesher = var.use_wesher
|
use_wesher = var.use_wesher
|
||||||
prometheus = true
|
prometheus = true
|
||||||
|
|
||||||
|
@ -120,6 +120,11 @@ job "${name}" {
|
|||||||
path = "${service_check.path}"
|
path = "${service_check.path}"
|
||||||
interval = "${service_check.interval}"
|
interval = "${service_check.interval}"
|
||||||
timeout = "${service_check.timeout}"
|
timeout = "${service_check.timeout}"
|
||||||
|
|
||||||
|
check_restart {
|
||||||
|
limit = 5
|
||||||
|
grace = "90s"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%{~ endif ~}
|
%{~ endif ~}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user