Monitoring JDBC Connection Pools on WebSpere 7
NickName:alphamikevictor Ask DateTime:2015-03-20T18:43:36

Monitoring JDBC Connection Pools on WebSpere 7

Recently we started in production with a new application hosted in several WebSphere Aplication Server and would be nice to have them monitored/graphed with more or less the same parameters we monitor/graph our Jboss servers.

Right now I managed to monitor several points with wsadmin using jython scripts:

  • Java HEAP
  • Issue a "Test connection" to all datasources

However I'm not able to find the way to monitor JDBC Connection Pools, to check PoolSize, WaitingThreadCount, and FreePoolSize values. I can monitor them on RealTime using Tivoli Performance Viewer included in the WAS DMGR:

Tivoli Performance Viewer JDBC connection pool

But I didn't find the way to get it through wsadmin (or any other way) so I can obtain the values and add to Cacti/RRD to obtain graphs like we already have with Jboss:

enter image description here

Does anyone managed to get this data from websphere with wsadmin or any other tools?

Copyright Notice:Content Author:「alphamikevictor」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/29164661/monitoring-jdbc-connection-pools-on-webspere-7

Answers
Marcin Płonka 2015-03-21T08:49:43

if you really insist on wsadmin\n\nA number of WAS MBeans exposes stats attribute. This attribute represents runtime statistics of the component. In your case, the MBean type would be JDBCProvider and its stats object implements javax.management.j2ee.statistics.JDBCStats interface defined in JSR-77.\n\nHaving that stats attribute value at hand, you'll be able to extract all other data.\n\nOne important note: in wsadmin you'll need to use getAttribute_jmx function of AdminControl, not just getAttribute.\n\nAdvertisement mode Working with wsadmin and MBeans can be tough, especially when it comes to accessing complex attributes. You may find this process easier with WDR.\n\nOther options\n\nStarting wsadmin process periodically only to query one or two attributes seem add too much overhead to me. An alternative is to install some code in your WSAS that could expose those stats in easily consumable way. One such tool is Jolokia. Jolokia is a web application exposing MBeans via HTTTP, using XML or JSON formats. Having Jolokia running in your WSAS, you can simply query it periodically from any programming language and then feed your time series choice.\n\nObviously, WSAS has its own specifics: extra MBeanServer, security, hence you'll need extra descriptors and code. Also, by default Jolokia can't serialize JSR-77 objects, so you'll need to provide those serializers yourself. I've been using Jolokia with WSAS in the past and all of those missing parts can be found in a clone of Jolokia repo. Roland Huss (the author of Jolokia) implemented some of those (excluding EAR and WSAS descriptors) in Jolokia-Extra project.",


More about “Monitoring JDBC Connection Pools on WebSpere 7” related questions

Monitoring JDBC Connection Pools on WebSpere 7

Recently we started in production with a new application hosted in several WebSphere Aplication Server and would be nice to have them monitored/graphed with more or less the same parameters we moni...

Show Detail

Monitoring JDBC connection pools

I'm connecting my Java application via JDBC driver and Tomcat configurations. I used this class to define my configurations. But sometimes, I got following exceptions: com.mysql.jdbc.exceptions.

Show Detail

Should Hystrix replace existing JDBC/HTTP connection pools, or delegate to them?

Many applications use connection pools for both HTTP and JDBC calls for resiliency. But using and configuring these 2 types of pools is very different. This duplicates the complexity of implementing

Show Detail

Multiple connection pools in Tomcat 7

I have a web app running on Tomcat 7, that requires a connection to multiple databases. For efficiency's sake I'd like to employ multiple connection pools using JDBC and probably DBCP. What optio...

Show Detail

JTA aware JDBC connection pools

I've been looking at a number of JDBC connection pools, but I have the specific requirement that the pool needs to be JTA aware, which leaves me with a short list of Apache DBCP and OW2 XAPool. The...

Show Detail

Flushing JDBC connection pools

Does anyone know the best (or any) way to flush a JDBC connection pool? I can't find anything obvious in the documentation. It appears connection pools aren't meant to ever be deleted. My current

Show Detail

JDBC Connection pool monitoring GlassFish

I am trying to find a setting by which the connection pool monitoring information would come in the server.log whenever an error like "error allocating a connection" or "connection closed" occur. ...

Show Detail

Comparing Glassfish Connection Pool With Other Connection Pools

Has anyone done any benchmarking comparing the glassfish connection pool with other fast jdbc connection pools like BoneCP or Tomcat 7 jdbc pool? I am exploring out ways to create the glassfish

Show Detail

Some confusion surrounding JDBC Resources and JDBC Connection pools Glassfish

I am about to make a connection to my database and I am using EJB and JPA. I have recently started doing these technologies so I have some problems understand it all at this point:) I know that the

Show Detail

MySQL implementation of connection pools

Does MySQL jdbc driver has built in support for database connection pools? (like Oracle has OracleDataSource class) I did a thorough search but couldn't find any. I know that I can use external

Show Detail