VMware vSphere

 View Only
  • 1.  Monitoring database connection pools in Tomcat

    Posted Jan 10, 2011 07:56 PM
    Hello,

    How do I monitor database connection pools in my Tomcat 6.0 servers with Hyperic? I did some digging in to the documentation, and I found the below URL referencing the "DataSource Pool Service", but I am not sure if that is what I am looking for, nor how to configure it if it is what I need.

    http://support.hyperic.com/display/hypcomm/Apache+Tomcat+6.0+DataSource+Pool+service

    My Tomcat servers do not show any DataSource Pools in Hyperic. Hyperic did auto-discover the other metrics referenced in the Tomcat plugin docs, such as Cache, Global Request Processor, Thread pools, etc.

    Also, I see at the bottom of the Tomcat config screen in Hyperic that "Auto-Discovery for Caches, DataSource Pools, and other services is ON".

    Any idea on how to monitor Tomcat DB connection pools with Hyperic?

    Thanks,
    Brian


  • 2.  RE: Monitoring database connection pools in Tomcat

    Posted May 25, 2011 02:36 PM
    Hi ,

    I face the same issue here.. Please help if anyone has any idea of how to get database pool service working for a tomcat 6.0 instance.


  • 3.  RE: Monitoring database connection pools in Tomcat

    Posted Sep 16, 2011 07:54 PM
    I was able to get it to auto-discover the database connection pools under 4.5.1 and 4.5.2. However, I am not sure if my application developer used dedicated connections or pools, so when my count is "zero," I don't know if that is correct or wrong. Apparently the documentation on whether to pool or not pool says that an application should handle X queries per second or higher before the application developer should consider the burden of using connection pools. I think my use case is below that threshold, so they chose to use dedicated connections.


  • 4.  RE: Monitoring database connection pools in Tomcat

    Posted Sep 19, 2011 08:16 PM
    I presume, at this point, that you have configured JMX monitoring of your Tomcat server. Without JMX, you will get nowhere and it will not auto-discover the resources including any deployed beans. The rest of this message is a guide for you if you don't have JMX enabled. Search the 'net for detailed guidance.

    Setting up JMX is not trivial. Most of the Internet posts on it suggest that you open access to anyone, giving them read and write access, which is a really bad idea in practice, but doing that initially in order to get HQ talking to it is a great start. Production systems should be much more protected, possibly even removing write access for all remove users. Unfortunately, locking down the config gets more complicated the more resilient you make it. Options are: disabled, enabled no security, enabled with names/passwords but unencrypted (SSL), enabled with names/passwords and encrypted (SSL). The default for JMX is disabled. LAN configurations might get away with unencrypted communication, but WAN access should be encrypted.

    Under Windows,. you have to modify the variables used by the service. Just modifying the startup.bat file doesn't work since the service doesn't use that method. The Tomcat6w program has a Java options tab that lets you add the -D variables. Warning: locking down the password file is tricky, but getting it wrong prevents the service from starting. Enable or disable password to ensure that permissions are your problem and then beat on them until they are correct. In short, the account running Tomcat must own the file and have exclusive access to it - no Administrator group access inherited from the parent.

    Under *nix, you will have to research how your particular version starts up and inject the additional options into the Java parameters (e.g. JAVA_OPT). Permissions probably need to be exclusive to the user ID running Tomcat too, but a chown/chmod later and you're done. Much simpler than Windows.


  • 5.  RE: Monitoring database connection pools in Tomcat

    Posted Sep 19, 2011 10:06 PM
    I still have not been able to get Hyperic to auto-discover any database connection pools. I am running 4.5.2 and Tomcat 6.0.29 on Windows.

    All of the other Tomcat JMX monitoring stuff works fine.