Attaching a JMX java agent

Hi,

I need to monitor the main components of apigee edge for private cloud using a JMX java agent. I understand that there are two ways to load the java agent;

1- Static Loading: using the start script of a component. For example for the management server I would edit the start script /opt/apigee/edge-management-server/bin/start as follows:

Default

exec $JAVA -classpath "$classpath" -Xms$min_mem -Xmx$max_mem $xx_opts -Djava.security.auth.login.config=$conf_path/jaas.config -Dinstallation.dir=$install_dir $sys_props -Dconf.dir=$conf_path -Ddata.dir=$data_dir $ext_jvm_opts $* $debug_options

To-Be

exec $JAVA -classpath "$classpath" -Xms$min_mem -Xmx$max_mem $xx_opts -javaagent:/opt/javaagent/javaagent.jar -Djava.security.auth.login.config=$conf_path/jaas.config -Dinstallation.dir=$install_dir $sys_props -Dconf.dir=$conf_path -Ddata.dir=$data_dir $ext_jvm_opts $* $debug_options \ -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=1099 \ -Dcom.sun.management.jmxremote.local.only=false \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false \ com.apigee.kernel.MicroKernel

2- Dynamic Loading: Attaching the javaagent to the JVM using by passing the PID of the apigee component.

What is the recommended approach by Google? Is there a reference JMX monitoring application?

Thanks.

0 1 261
1 REPLY 1

We are currently adopting the static loading approach while adding the java agent's libraries directory in the $classpath variable in the start scripts. I will share the updates once we complete the testing