2018-01-04 23:04:45 +00:00
|
|
|
job "service_check_restart" {
|
2019-10-11 12:00:05 +00:00
|
|
|
type = "service"
|
|
|
|
|
|
|
|
group "group" {
|
|
|
|
task "task" {
|
|
|
|
service {
|
|
|
|
name = "http-service"
|
|
|
|
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "10s"
|
|
|
|
ignore_warnings = true
|
2018-01-04 23:04:45 +00:00
|
|
|
}
|
2019-10-11 12:00:05 +00:00
|
|
|
|
|
|
|
check {
|
|
|
|
name = "random-check"
|
|
|
|
type = "tcp"
|
|
|
|
port = "9001"
|
|
|
|
}
|
|
|
|
}
|
2018-01-04 23:04:45 +00:00
|
|
|
}
|
2019-10-11 12:00:05 +00:00
|
|
|
}
|
2018-01-04 23:04:45 +00:00
|
|
|
}
|