diff options
| -rw-r--r-- | zones.d/global-templates/services.conf | 15 | ||||
| -rw-r--r-- | zones.d/master/hosts.conf | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/zones.d/global-templates/services.conf b/zones.d/global-templates/services.conf index 9081f19..825b9fe 100644 --- a/zones.d/global-templates/services.conf +++ b/zones.d/global-templates/services.conf @@ -55,3 +55,18 @@ apply Service "apt" { assign where host.vars.os_family == "debian" } + +/** + * Serice health checks + */ + +apply Service "pgsql" { + import "generic-service" + + check_command = "pgsql" + + vars.pgsql_hostname = "/run/postgresql" + vars += host.vars.pgsql + + assign where host.vars.pgsql != "" +} diff --git a/zones.d/master/hosts.conf b/zones.d/master/hosts.conf index f306dde..eaa89ec 100644 --- a/zones.d/master/hosts.conf +++ b/zones.d/master/hosts.conf @@ -24,4 +24,6 @@ object Host "new-babbage.server.tobiaswiese.net" { http_uri = "/icingaweb2" } } + + vars.pgsql = { } } |
