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