Get Tomcat's Database Pools utilization metrics
If you have several Apache Tomcat instances, have you ever wondered how their database connection pool are behaving? Last week, we had an outage in our of our services, due to a under estimated connection pool so, we had the motivation to gain observability on these resources' metrics, initially at least active and maximum configured connections per pool.
Currently we have pools only for PostgreSQL and HSQLDB so, those will be the cases considered in our first approach. Metrics will be sent to AWS CloudWatch for further analysis / alarms.
Approach taken: JMXProxy
Initial draft shell script in file