Files
neon/compute/etc/sql_exporter/connection_counts.sql
Tristan Partin 837c68b6df Track application_name in connection_counts metric
It will help us understand what applications are exhausting the number
of direct database connections.

Signed-off-by: Tristan Partin <tristan@neon.tech>
2024-11-14 10:20:27 -06:00

2 lines
124 B
SQL

SELECT datname, application_name, state, count(*) AS count FROM pg_stat_activity WHERE state <> '' GROUP BY datname, state;