2019-08-19 13:17:38 +00:00
|
|
|
job "group_service_check_script" {
|
|
|
|
group "group" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
network {
|
|
|
|
mode = "bridge"
|
|
|
|
|
|
|
|
port "http" {
|
2019-10-11 12:00:05 +00:00
|
|
|
static = 80
|
|
|
|
to = 8080
|
2019-08-19 13:17:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
2021-07-22 19:25:36 +00:00
|
|
|
name = "foo-service"
|
|
|
|
port = "http"
|
|
|
|
on_update = "ignore"
|
2019-08-19 13:17:38 +00:00
|
|
|
|
|
|
|
check {
|
|
|
|
name = "check-name"
|
|
|
|
type = "script"
|
|
|
|
command = "/bin/true"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
initial_status = "passing"
|
|
|
|
task = "foo"
|
2021-07-22 19:25:36 +00:00
|
|
|
on_update = "ignore"
|
2021-07-22 19:34:23 +00:00
|
|
|
body = "post body"
|
2019-08-19 13:17:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "foo" {}
|
|
|
|
}
|
|
|
|
}
|