summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2022-09-02 22:43:26 +0300
committerGitHub <noreply@github.com>2022-09-02 22:43:26 +0300
commit89d3db69b197d65357b76a66ab90395daf51c523 (patch)
tree3819054cb96de55b49b81a2ab1968faf22656757 /health
parent13aaa7923d7c8a42a3c060a30ec99254626ee7f4 (diff)
add Postgres total connection utilization alarm (#13620)
Diffstat (limited to 'health')
-rw-r--r--health/Makefile.am1
-rw-r--r--health/health.d/postgres.conf16
2 files changed, 17 insertions, 0 deletions
diff --git a/health/Makefile.am b/health/Makefile.am
index 777b35858b..1bf3c87893 100644
--- a/health/Makefile.am
+++ b/health/Makefile.am
@@ -67,6 +67,7 @@ dist_healthconfig_DATA = \
health.d/netfilter.conf \
health.d/nut.conf \
health.d/pihole.conf \
+ health.d/postgres.conf \
health.d/portcheck.conf \
health.d/processes.conf \
health.d/python.d.plugin.conf \
diff --git a/health/health.d/postgres.conf b/health/health.d/postgres.conf
new file mode 100644
index 0000000000..47267555bf
--- /dev/null
+++ b/health/health.d/postgres.conf
@@ -0,0 +1,16 @@
+# you can disable an alarm notification by setting the 'to' line to: silent
+
+ template: total_connection_utilization
+ on: postgres.connections_utilization
+ class: Utilization
+ type: Database
+component: PostgreSQL
+ hosts: *
+ lookup: average -1m unaligned of used
+ units: %
+ every: 1m
+ warn: $this > (($status >= $WARNING) ? (70) : (80))
+ crit: $this > (($status == $CRITICAL) ? (80) : (90))
+ delay: down 15m multiplier 1.5 max 1h
+ info: average total connection utilization over the last minute
+ to: dba