summaryrefslogtreecommitdiffstats
path: root/zones.d/global-templates
diff options
context:
space:
mode:
authorTobias Wiese <tobias@tobiaswiese.com>2020-05-13 20:10:08 +0200
committerTobias Wiese <tobias@tobiaswiese.com>2020-05-14 12:15:16 +0200
commit34fe8a57df416e7e2b8be0c954a1fa6d6d596c95 (patch)
treec6039d19c887c247856bd44cb18f4ab346d7d0a6 /zones.d/global-templates
parent240b4f8e9f33086ce8cfa2734b5c55a1484d5419 (diff)
service/pgsql: Monitor PostgreSQL
Tries to connect to a database in the postgresql cluster. Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
Diffstat (limited to 'zones.d/global-templates')
-rw-r--r--zones.d/global-templates/services.conf15
1 files changed, 15 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 != ""
+}