Reatart failing services
Restart services that fail checks
This commit is contained in:
parent
f2f415aeac
commit
64a085ef80
@ -1,12 +1,13 @@
|
|||||||
module "minitor" {
|
module "minitor" {
|
||||||
source = "./service"
|
source = "./service"
|
||||||
|
|
||||||
name = "minitor"
|
name = "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
|
||||||
use_wesher = var.use_wesher
|
service_check = null
|
||||||
prometheus = true
|
use_wesher = var.use_wesher
|
||||||
|
prometheus = true
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
TZ = "America/Los_Angeles",
|
TZ = "America/Los_Angeles",
|
||||||
|
@ -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