GlassFish application server monitoring
GlassFish is an open-source Jakarta EE application server used to deploy and manage enterprise Java applications.
With Site24x7, you can monitor the health and performance of your GlassFish environment using real-time insights into JVM memory, thread pools, JDBC pools, request processing, JMS resources, session activity, garbage collection, and application availability. This helps you quickly identify performance bottlenecks, troubleshoot issues, and ensure optimal application performance.
Supported GlassFish versions
- GlassFish server 3.x to 7.x
Prerequisites
Before adding a GlassFish monitor, ensure the following:
- JMX monitoring is enabled on the GlassFish server.
Enable JMX Monitoring in GlassFish
JMX is enabled by default in GlassFish. However, if JMX has been disabled, you must re-enable it before configuring the GlassFish monitor in Site24x7.
Re-enable JMX
- Log in to the GlassFish Administration Console.
- Navigate to Configurations > server-config > JVM Settings > JVM Options.
- Add the following JVM options:
-Djava.rmi.server.hostname=<your-server-ip> -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8686 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
- Save the changes and restart the GlassFish server for the configuration to take effect.
Replace
<your-server-ip>with the IP address or hostname of the GlassFish server.
- The GlassFish server is configured to allow remote JMX connections.
- The Site24x7 On-Premise Poller can reach and connect to the GlassFish server's JMX host and port over the network.
Add a monitor
- Navigate to Apps > Enterprise Applications > GlassFish and click the + icon.
- On the Add GlassFish page, add an On-Premise Poller or choose from an existing one.
GlassFish monitoring is supported from Poller version 6.9.0 and above.
- On the Add GlassFish Monitor page, fill in the following details to add the GlassFish application server monitor:
- Display Name: Specify a name to identify the GlassFish monitor in Site24x7.
- Host Name/IP Address: Provide the hostname or IP address of the server where the GlassFish application server is running.
- Port: Specify the JMX port used for monitoring the GlassFish instance.
- JNDI Path for JMX: Provide the JNDI name used to establish the remote JMX connection for monitoring the GlassFish instance.
- Location Profile: Select the location profile from where the GlassFish application server can be monitored from the drop-down list. To learn more, refer to the location profile help page.
- Associate Monitor Group: Select a monitor group from the drop-down list to logically group your monitors. To learn how to create a group for your monitors, refer to the monitor groups help page.
- In the GlassFish User Credentials section, choose the appropriate credentials stored in the Site24x7 credential profile or add new ones.
To add a new credential:
- Click the + icon next to the GlassFish Credential field.
- In the resulting Add Credential pop-up, provide a Credential Name to identify the credential. GlassFish will be auto-selected as the Credential Type.
- Provide the Username and Password of the associated GlassFish Application Server account.
- Click Save.
- Specify the following details for Configuration Profiles, Alert Settings, and Third-Party Integrations:
- Tags: Associate your monitor with predefined tags to organize and manage your monitors creatively. Learn how to add tags.
- IT Automation Templates: Select an automation to be executed when the GlassFish application server's status is down, trouble, or up; when there's any status change; or when there's any attribute change. The defined action gets executed when there is a state change, and the selected user groups get alerted. To automate corrective actions upon a failure, refer to the IT automation help document.
- User Alert Group: Select the user group that needs to be alerted during an outage. To add multiple users to a group, see the user alert group help document.
- Notification Profile: Choose a notification profile from the drop-down list or select the default profile available. A notification profile helps you configure who gets notified and when in the event of downtime. Refer to the notification profile help document to create a customized notification profile.
- Third-Party Integrations: Associate your monitor with preconfigured third-party services. This lets you push your monitor alarms to selected services and facilitate improved incident management.
- Click Save.
View the monitor
To view the added GlassFish application server monitor:
- Navigate to Plugins > Enterprise Applications > GlassFish.
- Select the appropriate monitor to view the performance metrics.
Performance metrics
Find the performance metrics below to monitor the health and behavior of your GlassFish server and its components.
Server metrics
| Metric name | Description | Unit |
|---|---|---|
| Application Server Full Version | The complete version string of the GlassFish application server instance being monitored. | - |
| Name | The name identifier of the GlassFish server instance. | - |
| Uptime | Total time the GlassFish server has been running since the last restart. | ms |
| Active Applications Deployed | Number of applications currently deployed and active on the server. | Count |
| Active Count | Number of threads currently in the active/runnable state in the JVM. | Count |
| Blocking | Number of threads currently blocked and waiting for a monitor lock. | Count |
| Committed | Number of transactions that have been successfully committed. | Count |
| Committed Heap Size | Amount of heap memory guaranteed to be available for the JVM. | Bytes |
| Committed Non Heap Size | Amount of non-heap memory guaranteed to be available for the JVM (for example, metaspace and code cache). | Bytes |
| Daemon Thread Count | Number of daemon threads currently running in the JVM. | Count |
| Deadlocked | Number of threads in a deadlock state waiting on each other indefinitely. | Count |
| Free Memory | Amount of free memory available in the JVM heap. | Bytes |
| Free Memory % | Percentage of JVM heap memory that is currently free and unused. | Percent |
| Init Heap Size | Initial amount of heap memory requested from the operating system at JVM startup. | Bytes |
| Init Non Heap Size | Initial amount of non-heap memory requested from the operating system at JVM startup. | Bytes |
| Loaded Class | Number of classes currently loaded in the JVM. | Count |
| Max Heap Size | Maximum amount of heap memory that can be used for memory management. | Bytes |
| Max Non Heap Size | Maximum amount of non-heap memory that can be allocated. | Bytes |
| Used Memory % | Percentage of JVM heap memory currently in use. | Percent |
| Object Pending Finalization | Number of objects that are pending finalization by the garbage collector. | Count |
| Other Requests | Number of HTTP requests with response codes outside the standard 2xx-5xx ranges. | Count |
| Peak Threads | Peak number of live threads since the JVM started or the peak was reset. | Count |
| Reachability Check | Indicates whether the GlassFish server is reachable and responding to monitoring requests. | - |
| Rolled Back | Number of transactions that have been rolled back due to errors or timeouts. | Count |
| Running | Number of threads currently in the running state and executing application code. | Count |
| Threads | Total number of live threads currently active in the JVM, including daemon and non-daemon threads. | Count |
| Timed Waiting | Number of threads waiting for a specified amount of time (for example, Thread.sleep or Object.wait with timeout). | Count |
| Total2Xx | Total number of HTTP responses with 2xx (success) status codes. | Count |
| Total3Xx | Total number of HTTP responses with 3xx (redirection) status codes. | Count |
| Total4Xx | Total number of HTTP responses with 4xx (client error) status codes. | Count |
| Total5Xx | Total number of HTTP responses with 5xx (server error) status codes. | Count |
| Total Requests | Total number of HTTP requests received by the GlassFish server. | Count |
| Total Memory | Total amount of memory currently allocated in the JVM heap. | Bytes |
| Total Started | Total number of threads created and started since the JVM launched. | Count |
| UnLoaded Class | Total number of classes that have been unloaded from the JVM since startup. | Count |
| Used Heap Size | Amount of heap memory currently occupied by live objects. | Bytes |
| Used Non Heap Size | Amount of non-heap memory currently in use (metaspace, compiled code, etc.). | Bytes |
| Waiting | Number of threads in the waiting state (for example, Object.wait without timeout or Thread.join). | Count |
Web app metrics
| Metric name | Description | Unit |
|---|---|---|
| Activated Sessions Total | Total number of HTTP sessions that have been activated (deserialized/restored) across all requests. | Count |
| Active Sessions Current | Number of HTTP sessions currently active and being tracked by the web application. | Count |
| Expired Sessions Total | Total number of HTTP sessions that have expired due to inactivity timeout. | Count |
| Rejected Sessions Total | Total number of HTTP sessions that were rejected because the maximum session limit was reached. | Count |
JSP metrics
| Metric name | Description | Unit |
|---|---|---|
| JSP | Number of JSP pages currently loaded and compiled in memory. | Count |
| JSP Errors | Number of errors encountered during JSP compilation or execution. | Count |
| JSP Reloaded | Number of JSP pages that have been reloaded/recompiled due to modifications. | Count |
| Total JSP | Total number of JSP pages that have been loaded since the application started. | Count |
Keep alive metrics
| Metric name | Description | Unit |
|---|---|---|
| Connections | Number of connections currently in a keep-alive state, being reused for multiple requests. | Count |
| Flushes | Number of times keep-alive connections were flushed (closed to free resources). | Count |
| Hits | Number of requests successfully served over existing keep-alive connections. | Count |
| Refusals | Number of keep-alive connection requests refused due to reaching the maximum limit. | Count |
| Max Requests | Maximum number of requests allowed over a single keep-alive connection before it is closed. | Count |
Thread pool metrics
| Metric name | Description | Unit |
|---|---|---|
| Core Threads | Minimum number of threads maintained in the thread pool, even when idle. | Count |
| Current Threads | Current number of threads allocated in the thread pool (both busy and idle). | Count |
| Current Threads Busy | Number of threads in the pool currently processing requests. | Count |
| Max Threads | Maximum number of threads that can be created in the thread pool. | Count |
| Total Executed Tasks | Total number of tasks/requests that have been executed by this thread pool since startup. | Count |
Garbage collection metrics
| Metric name | Description | Unit |
|---|---|---|
| Collections | Total number of garbage collection cycles executed by this collector since JVM startup. | Count |
| Collection Time | Cumulative time spent performing garbage collection by this collector. | ms |
JDBC metrics
| Metric name | Description | Unit |
|---|---|---|
| Max Pool Size | Maximum number of connections allowed in the JDBC connection pool. | Count |
| Connections Free | Number of connections currently available (idle) in the pool for use. | Count |
| Connections Timed Out | Number of connection requests that timed out while waiting for an available connection. | Count |
| Connections Used | Number of connections currently checked out from the pool and in active use. | Count |
| Potential Connection Leaks | Number of connections suspected of being leaked (not returned to the pool within the configured timeout). | Count |
| Wait Queue Length | Number of connection requests currently waiting in queue for an available connection. | Count |
Request metrics
| Metric name | Description | Unit |
|---|---|---|
| Count200 | Number of HTTP responses with status code 200 (OK - successful request). | Count |
| Count2Xx | Number of HTTP responses with any 2xx status code (all successful responses). | Count |
| Count302 | Number of HTTP responses with status code 302 (Found - temporary redirect). | Count |
| Count304 | Number of HTTP responses with status code 304 (Not Modified - cached content is still valid). | Count |
| Count3Xx | Number of HTTP responses with any 3xx status code (all redirections). | Count |
| Count400 | Number of HTTP responses with status code 400 (Bad Request - malformed syntax). | Count |
| Count401 | Number of HTTP responses with status code 401 (Unauthorized - authentication required). | Count |
| Count403 | Number of HTTP responses with status code 403 (Forbidden - access denied). | Count |
| Count404 | Number of HTTP responses with status code 404 (Not Found - resource does not exist). | Count |
| Count4Xx | Number of HTTP responses with any 4xx status code (all client errors). | Count |
| Count503 | Number of HTTP responses with status code 503 (Service Unavailable - server overloaded). | Count |
| Count5Xx | Number of HTTP responses with any 5xx status code (all server errors). | Count |
| Bytes Received | Total number of bytes received from incoming HTTP requests. | Bytes |
| Bytes Transmitted | Total number of bytes sent in HTTP responses to clients. | Bytes |
| Open Connections | Number of HTTP connections currently open and active on this listener. | Count |
| Count Other | Number of HTTP responses with status codes not categorized in the standard 2xx-5xx groups. | Count |
| Requests | Total number of HTTP requests processed by this request listener. | Count |
| Errors | Total number of requests that resulted in an error during processing. | Count |
| Max Time | Maximum time taken to process a single request on this listener. | ms |
| Processing Time | Total cumulative time spent processing all requests on this listener. | ms |
JMS connection factory metrics
| Metric name | Description | Unit |
|---|---|---|
| Connection Request Wait Time | Average time a connection request had to wait before a connection was available from the pool. | ms |
| Connections Acquired | Number of connections successfully acquired (checked out) from the JMS connection pool. | Count |
| Connections Created | Number of new physical connections created in the JMS connection pool. | Count |
| Connections Destroyed | Number of physical connections destroyed/closed and removed from the JMS pool. | Count |
| Connections Successfully Matched | Number of connection requests that were successfully matched to an existing pooled connection. | Count |
| Connections Timed Out | Number of JMS connection requests that timed out waiting for an available connection. | Count |
| Connections Used | Number of JMS connections currently in active use by applications. | Count |
| Potential Connection Leaks | Number of JMS connections suspected of being leaked (not returned within the expected timeout). | Count |
| Wait Queue Length | Number of JMS connection requests currently queued waiting for an available connection. | Count |
Network connection queue metrics
| Metric name | Description | Unit |
|---|---|---|
| Open Connections | Number of network connections currently open on this connection queue/listener. | Count |
| Count Overflows | Number of connection attempts rejected because the connection queue reached its maximum capacity. | Count |
| Count Queued | Number of connections currently waiting in the queue to be processed by a worker thread. | Count |
| Max Queued | Maximum number of connections that can be held in the queue before new connections are refused. | Count |
File cache metrics
| Metric name | Description | Unit |
|---|---|---|
| Content Hits | Number of times file content was successfully served from the cache instead of reading from the disk | Count |
| Content Misses | Number of times file content was not found in the cache, requiring a disk read | Count |
| Heap Size | Current amount of heap memory used by the file cache to store cached file content | MB |
| Hits | Total number of cache lookup hits (both content and metadata) | Count |
| Info Hits | Number of times file metadata/info was successfully retrieved from the cache | Count |
| Info Misses | Number of times file metadata/info was not found in the cache, requiring a filesystem lookup | Count |
| Mapped Memory Size | Amount of memory-mapped file storage currently used by the file cache | Bytes |
| Max Heap Size | Maximum heap memory allowed for the file cache to store content | MB |
| Max Mapped Memory Size | Maximum amount of memory-mapped storage allowed for the file cache | Bytes |
| Misses | Total number of cache lookup misses (both content and metadata) | Count |
| Open Cache Entries | Number of file entries currently stored and available in the cache | Count |
Other enterprise application servers
Explore monitoring support for other enterprise application servers available in Site24x7:
