API Gateway: How to monitor JDBC Connection Pool Size

book

Article ID: 141430

calendar_today

Updated On:

Products

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

Issue/Introduction

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

Environment

Release : 9.4

Component : API GTW ENTERPRISE MANAGER

Resolution

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 192.168.1.1:3306 | 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.