We are using Java microservices. We use Oracle with plain JDBC. We want to monitor how many connections are getting used from the JDBC connection pool. Suppose we have 50 connections in the JDBC pool. We want to monitor though some graph what is the number of currently used connections & details like when a connection is getting acquired & released back to the pool. It will help us in performance optimization. We used to do it in Hibernate by parsing logs something similar to this www.w3spot.com/.../log-when-jdbc-connection-is-acquired.html . But most of our applications don't use Hibernate anymore. And it would be time consuming to check for solutions in plain JDBC or build something new. We are looking for a readymade solution.
SolarWinds Database Performance Analyzer (DPA) analyzes the performance of database queries for Oracle as well as a number of other Database types (e.g., SQL Server, Db2, Sybase, MySQL, SAP ASE(Sybase), and more). Unlike DPM, DPA is not a SaaS offering but a product you can install on-premises or in the cloud and it monitors Oracle instances both on-premises and in the cloud (including AWS RDS and Aurora variants). DPA's agentless collection has extremely low overhead of less than 1% and has special support for Oracle RAC, Oracle EBS, and Oracle ASM environments.
Out of the box, DPA collects and graphs metrics for numerous Oracle resources including the number of:
You can configure an alert on those metrics to inform you if a threshold is exceeded.
If those metrics aren't sufficient for what you are looking for, you can very easily create custom metrics and/or create custom alerts as well. Essentially, all you need for a custom metric is an SQL query to capture the information you want from the analyzed Oracle database.
Here's a few resources that you should be able to find a query or queries for connections and sessions for the information you want DPA to monitor and/or alert against: