API Gateway: How to monitor JDBC Connection Pool Size


Article ID: 141430


Updated On:


CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway


How can the size of a JDBC Connection Pool Size be monitored on the API Gateway?


Release : 9.4



There are a few options that can be used here:


1. Using netstat on each node. You would basically run this command (replace IP and Port to the DB info accordingly): 

netstat -tnap | grep | wc -l 

This will output the number of TCP connections between that specific node to the specified IP address. This would need to be run on a node-per-node basis. 

This is a relatively quick and easy method, but it's not the most accurate, as it would require constantly checking netstat, and does not reflect the different connection states. So while not the most elegant solution, it would be good for getting a general idea. 

2. Monitor it from the database itself. Most database systems should have some level of monitoring for incoming connections. Though I'm not an expert in Oracle, I would imagine it would have similar tooling. Your DBA's may be able to better speak to this. 

3. Tools like our CA APM product (which has an integration with our API Gateway) provide some really low-level metrics/monitoring tools, and this may be one of the pieces of information it offers. 

4. Tools like Dynatrace and New Relic hook into the Gateway's JVM to gather low-level metrics as well, and this may be one of the pieces of information it gathers as well. While this isn't supported by us, we do have a number of customers that use these tools with success.