GlassFish monitoring

GlassFish is a reference J2EE implementation. It uses OSGi for modularity and Grizzly as web container. Both HTTP and EJB. There is also partial support for GlassFish default REST implementation. All common things, eg. SQL, JMS or LDAP are available as soon as proper scripts are added to scripts option in

Zorka has been tested on GlassFish 4.0. It might require additional tweaks for previous versions.

Agent Installation

Single server, single domain is the easiest installation scenario:

  • unpack zorka binary distribution in glassfish instance directory ${com.sun.aas.instanceRoot}/zorka;

  • add the following entry to ${com.sun.aas.instanceRoot}/config/server.policy file:

// Zorka agent permissions
grant codeBase "file:${com.sun.aas.instanceRoot}/zorka/-" {
  • in add the following JVM options to java-config nodes in ${com.sun.aas.instanceRoot}/config/default.xml (second option is needed only when JDK7 is used):
  • add agent packages to OSGI boot delegation path (either in ${com.sun.aas.instanceRoot}/config/ or in ${com.sun.aas.installRoot}/config/ - instance root file has higher priority):
org.osgi.framework.bootdelegation=${eclipselink.bootdelegation}, \
  com.sun.btrace, com.sun.btrace.*, \
  org.netbeans.lib.profiler, org.netbeans.lib.profiler.*, \
  com.jitlogic.zorka.core.spy, com.jitlogic.zorka.core.spy.*
  • load proper configuration scripts into zorka agent by setting scripts property in
scripts = jvm.bsh, zabbix.bsh, oracle/glassfish.bsh
  • start (or restart) server instance;
./asadmin stop-domain ; ./asadmin start-domain

In case of multi-instance domain, each instance needs to have its own zorka directory, configured in an independent manner.