We have a java application running on Cloud Foundry instrumented with the default APM agent that’s included in the default Java build pack. It would be very helpful for us to see some kind of JDBC connection pool metrics, like pool size, active connections, free connections or metrics like that. For Tomcat and Liberty in non Cloud Foundry environments we get these via JMX, are there any options to get metrics like that for Applications running on Cloud Foundry?
Agent properties can be passed in as java options (JAVA_OPTS) in the cloud foundry manifest.yml file. For example to enable JMX for Tomcat (which is not enabled by default) add the following JAVA_OPTS definition
- name: sample-app
JAVA_OPTS : "-Dintroscope.agent.jmx.enable=true -Dintroscope.agent.jmx.name.filter=*"
The manifest.yml is discussed in the documentation for running the Java agent in Cloud Foundry