-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of database connections per user #35196
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
backend_start would create a high cardinality situation. That won't work for this metric. |
After further thinking I do not see any use-case (in the context of observability systems, at least from my place) of this anyway. We could then just keep the |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
There is already metric postgresql.backends Source: SELECT datname, count(*) as count from pg_stat_activity group by datname; It doesn't have |
Indeed, it would be nice to have it. Thanks also for the pointer, I didn't realised that this metrics could actually allow to count active connections in a database. |
Component(s)
receiver/postgresql
Is your feature request related to a problem? Please describe.
The number of maximum database active connections can be configured and is already tracked through the
postgresql_connection_max
metrics, yet there is no metrics to track the active number of connections. However this is an essential thing to monitor.Describe the solution you'd like
Add a metrics named
postgresql_connection_active
with the following additional entries:Describe alternatives you've considered
Parse Loki logs to track connections vs disconnections, but this is a very rough approximation of the actual number of active connections...
Additional context
References:
Why active connections over max connections should be monitored
Query to get active connections per client
The text was updated successfully, but these errors were encountered: