template Service "generic-network-service" { import "generic-service" zone = "master" } /** * Basic node health checks */ apply Service "ping4" { import "generic-network-service" check_command = "ping4" assign where host.address } apply Service "ping6" { import "generic-network-service" check_command = "ping6" assign where host.address6 } apply Service "ssh" { import "generic-network-service" check_command = "ssh" vars.ssh_port = host.vars.ssh_port || 222 assign where (host.address || host.address6) && host.vars.kernel == "linux" } /** * Network Service checks */ template Service "http" { import "generic-network-service" check_command = "http" vars += { http_vhost = http_vhost http_sni = true http_warn_time = 0.2s http_critical_time = 0.3s } vars += config } apply Service "https-" for (http_vhost => config in host.vars.http_vhosts) { import "http" vars.http_ssl = true } apply Service "https-cert-" for (http_vhost => config in host.vars.http_vhosts) { import "http" vars.http_certificate = "25,10" }