From 34fe8a57df416e7e2b8be0c954a1fa6d6d596c95 Mon Sep 17 00:00:00 2001 From: Tobias Wiese Date: Wed, 13 May 2020 20:10:08 +0200 Subject: service/pgsql: Monitor PostgreSQL Tries to connect to a database in the postgresql cluster. Signed-off-by: Tobias Wiese --- zones.d/global-templates/services.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'zones.d/global-templates') 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 != "" +} -- cgit v1.2.3