diff --git a/global-templates/host-templates.conf b/global-templates/host-templates.conf index fb7f191..ffe20a9 100644 --- a/global-templates/host-templates.conf +++ b/global-templates/host-templates.conf @@ -16,9 +16,15 @@ template Host "generic-host" { check_command = "hostalive" } -template Host "debian-host" { +template Host "linux-host" { import "generic-host" + vars.os = "Linux" +} + +template Host "debian-host" { + import "linux-host" + vars.osfamily = "Debian" vars.procs = { diff --git a/global-templates/services.conf b/global-templates/services.conf index dd1ac03..8115d77 100644 --- a/global-templates/services.conf +++ b/global-templates/services.conf @@ -12,12 +12,54 @@ apply Service "apt" { assign where host.vars.osfamily == "Debian" } +apply Service "disk " for (disk => config in host.vars.disks) { + import "generic-service" + + check_command = "disk" + + vars += config + + assign where host.vars.disks +} + +apply Service (http_vhost => config in host.vars.http_vhosts) { + import "generic-service" + + check_command = "http" + + vars += config +} + apply Service "icinga" { import "generic-service" check_command = "icinga" - assign where true + assign where host.name == NodeName +} + +apply Service "load" { + import "generic-service" + + check_command = "load" + + assign where host.name == NodeName +} + +apply Service "ping4" { + import "generic-service" + + check_command = "ping4" + + assign where host.address +} + +apply Service "ping6" { + import "generic-service" + + check_command = "ping6" + + assign where host.address6 } apply Service "procs" { @@ -25,7 +67,7 @@ apply Service "procs" { check_command = "procs" - assign where true + assign where host.name == NodeName } apply Service "proc-" for (proc => config in host.vars.procs) { @@ -38,12 +80,18 @@ apply Service "proc-" for (proc => config in host.vars.procs) { assign where host.vars.disks } -apply Service "disk " for (disk => config in host.vars.disks) { +apply Service "ssh" { import "generic-service" - check_command = "disk" + check_command = "ssh" - vars += config + assign where (host.address || host.address6) && host.vars.os == "Linux" && !host.vars.no_check_ssh +} - assign where host.vars.disks +apply Service "users" { + import "generic-service" + + check_command = "users" + + assign where host.name == NodeName } diff --git a/master/hosts.conf b/master/hosts.conf index 4014589..d4dbe3a 100644 --- a/master/hosts.conf +++ b/master/hosts.conf @@ -13,4 +13,9 @@ object Host "beholder" { vars.disks["/boot/efi"] = { disk_partitions = "/boot/efi" } + + vars.http_vhosts["http redirect"] = { + http_uri = "/" + http_headerstring = "Location: https://beholder.cacert.org/" + } }