I need to monitor my application performance and its use of database connections. The application, an ASP.NET Core 2.2 app, uses Entity Framework Core 2.x and a PostgreSQL database server with Npgsql. All of that runs in production on Ubuntu Linux, development is with Visual Studio on Windows 10. Connection pooling is activated and a maximum pool size is set in the connection string.
How can I find out how many connections are currently in the pool, and is there additional data available about how much the pool is used (min/max active connections, wait time etc.)?
I've read about Performance Counters in ADO.NET (via this question) but that seems to apply to Windows only and may not be supported by .NET Core.