You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface the number of database connections awx is making to roll more of the data administrators need to track into /api/v2/metrics
Users can track this now by creating some kind of exporter that directly queries PG, but this is in general hacky and not portable. We know if we exceed the max connections that things start to go bad, so it is a best practice to track this number.
And create a database_stats function that returns a dictionary with a key for current connections by awx user. I say a dictionary so we can later expand that if desired, like adding number of idle vs active connections, or the max connections. These could then get surfaced like we do for guages like ORG_COUNT.
ISSUE TYPE
SUMMARY
Surface the number of database connections awx is making to roll more of the data administrators need to track into /api/v2/metrics
Users can track this now by creating some kind of exporter that directly queries PG, but this is in general hacky and not portable. We know if we exceed the max connections that things start to go bad, so it is a best practice to track this number.
Maybe we can follow pattern of
awx/awx/main/analytics/collectors.py
Lines 255 to 260 in 4dc956c
And create a
database_stats
function that returns a dictionary with a key for current connections by awx user. I say a dictionary so we can later expand that if desired, like adding number of idle vs active connections, or the max connections. These could then get surfaced like we do for guages like ORG_COUNT.awx/awx/main/analytics/metrics.py
Line 18 in 4dc956c
The text was updated successfully, but these errors were encountered: