add Postgres total connection utilization alarm (#13620)
Ilya Mashchenko committed
Sep 2, 2022 at 22:43 UTC
89d3db69b197d65357b76a66ab90395daf51c523
2 files changed
+17
health/Makefile.am
+1
@@ -67,6 +67,7 @@ dist_healthconfig_DATA = \
67
health.d/netfilter.conf \
68
health.d/nut.conf \
69
health.d/pihole.conf \
70
+ health.d/postgres.conf \
71
health.d/portcheck.conf \
72
health.d/processes.conf \
73
health.d/python.d.plugin.conf \
health/health.d/postgres.conf
new
+16
@@ -0,0 +1,16 @@
1
+# you can disable an alarm notification by setting the 'to' line to: silent
2
+
3
+ template: total_connection_utilization
4
+ on: postgres.connections_utilization
5
+ class: Utilization
6
+ type: Database
7
+component: PostgreSQL
8
+ hosts: *
9
+ lookup: average -1m unaligned of used
10
+ units: %
11
+ every: 1m
12
+ warn: $this > (($status >= $WARNING) ? (70) : (80))
13
+ crit: $this > (($status == $CRITICAL) ? (80) : (90))
14
+ delay: down 15m multiplier 1.5 max 1h
15
+ info: average total connection utilization over the last minute
16
+ to: dba