GlassFish Monitoring Extension

This extension works only with the standalone machine agent.

 

Use Case

 

GlassFish is the reference implementation of Java EE and as such supports Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages, servlets, etc. This allows developers to create enterprise applications that are portable and scalable, and that integrate with legacy technologie.

 

Prerequisites

 

Please enable JMX for the glassfish container if not already enabled.

 

Installation

 

  1. Download and unzip the file 'GlassFishMonitor.zip' to <machineagent install dir}/monitors
  2. Open monitor.xml and configure the GlassFish arguments
<!-- The configuration file which lists out the servar details and metrics to be included from monitoring on controller-->
<argument name="config-file" is-required="true" default-value="monitors/GlassFishMonitor/config.yml" />

Configuration

 

Note : Please make sure not to use tab (\t) while editing yaml files. You can validate the yaml file using a yaml validator

  1. Configure the GlassFish Extension by editing the config.yml file in <MACHINE_AGENT_HOME>/monitors/GlassFishMonitor/.
  2. Specify the container host, JMX port, username and password in the config.yml. Configure the MBeans for this extension to report the metrics to Controller. By default, amx is the domain name.

    For eg.

    # GlassFish instance particulars
    
    server:
        host: "localhost"
        port: 8686
        username: "admin"
        password: "admin"
    
    # GlassFish MBeans
    mbeans:
        domainName: "amx"
        types: {EJBModule:[state],
                J2EEApplication:[state],
                J2EEServer:[state],
                WebModule:[state],
                connector-connection-pool:[ConnectionCreationRetryAttempts,ConnectionCreationRetryIntervalInSeconds,IdleTimeoutInSeconds,
                                           MaxConnectionUsageCount,MaxPoolSize,MaxWaitTimeInMillis,PoolResizeQuantity,SteadyPoolSize],
                ejb-container:[CacheIdleTimeoutInSeconds,CacheResizeQuantity,MaxCacheSize,MaxPoolSize,PoolIdleTimeoutInSeconds,
                               PoolResizeQuantity,RemovalTimeoutInSeconds,SteadyPoolSize],
                http:[CompressionMinSizeBytes,ConnectionUploadTimeoutMillis,HeaderBufferLengthBytes,MaxConnections,MaxPostSizeBytes,
                      MaxRequestHeaders,MaxResponseHeaders,RequestTimeoutSeconds,SendBufferSizeBytes,TimeoutSeconds],
                jdbc-connection-pool:[ConnectionCreationRetryAttempts,ConnectionCreationRetryIntervalInSeconds,ConnectionLeakTimeoutInSeconds,
                                      IdleTimeoutInSeconds,MaxConnectionUsageCount,MaxPoolSize,MaxWaitTimeInMillis,PoolResizeQuantity,
                                      StatementCacheSize,StatementLeakTimeoutInSeconds,SteadyPoolSize],
                thread-pool:[IdleThreadTimeoutSeconds,MaxQueueSize,MaxThreadPoolSize,MinThreadPoolSize]}
    
    #prefix used to show up metrics in AppDynamics
    metricPrefix:  "Custom Metrics|GlassFish|"
    
    

Metrics

 

The following metrics are reported.

connector-connection-pool

ConnectionCreationRetryAttempts
ConnectionCreationRetryIntervalInSeconds
IdleTimeoutInSeconds
MaxConnectionUsageCount
MaxPoolSize
MaxWaitTimeInMillis
PoolResizeQuantity
SteadyPoolSize

ejb-container

CacheIdleTimeoutInSeconds
CacheResizeQuantity
MaxCacheSize
MaxPoolSize
PoolIdleTimeoutInSeconds
PoolResizeQuantity
RemovalTimeoutInSeconds
SteadyPoolSize

http

CompressionMinSizeBytes
ConnectionUploadTimeoutMillis
HeaderBufferLengthBytes
MaxConnections
MaxPostSizeBytes
MaxRequestHeaders
MaxResponseHeaders
RequestTimeoutSeconds
SendBufferSizeBytes
TimeoutSeconds

jdbc-connection-pool

ConnectionCreationRetryAttempts
ConnectionCreationRetryIntervalInSeconds
ConnectionLeakTimeoutInSeconds
IdleTimeoutInSeconds
MaxConnectionUsageCount
MaxPoolSize
MaxWaitTimeInMillis
PoolResizeQuantity
StatementCacheSize
StatementLeakTimeoutInSeconds
SteadyPoolSize

thread-pool

IdleThreadTimeoutSeconds
MaxQueueSize
MaxThreadPoolSize
MinThreadPoolSize

Custom Dashboard

 

 

Contributing

 

Always feel free to fork and contribute any changes directly via GitHub.

 

Support

 

For any support questions, please contact ace@appdynamics.com.

 

Version:

1.0.1

Compatibility:

3.7

GlassFish Version:

3.1.2

Last Update:

10/01/2014

 

 

Changes in versions:
1.0.1: Fixed the config file location