Plugin for GlassFish Monitoring

Monitor GlassFish servers using Site24x7 and stay on top of issues.

Start 30-day free trial Try now, sign up in 30 seconds

GlassFish is an open source application server project sponsored by Oracle corporation. Configure Site24x7 plugin to monitor the performance of your GlassFish servers.

This document details how to configure the Oracle GlassFish plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of GlassFish servers.

GlassFish performance monitoring metrics:

Troubleshoot your GlassFish environment with ease by keeping track of critical metrics including:

Committed heap/non-heap memory

The metrics 'usedheapsize-count' and 'usednonheapsize-count' gives us the total amount of used heap/non-heap memory in bytes.

Maximum heap/non-heap memory

The metrics 'maxheapsize-count' and 'maxnonheapsize-count' gives us the maximum amount of heap/non-heap memory in bytes that can be used for memory management.

Initial heap/non-heap memory

The metrics 'initheapsize-count' and 'initnonheapsizecount' gives us the total amount of heap/non-heap memory in bytes that the JVM initially requests from OS for memory management.

Committed heap/non-heap memory

The metrics 'committedheapsize-count' and 'committednonheapsize-count' gives us the total amount of heap/non-heap memory in bytes that is committed for the JVM to use.

Object pending finalization

The metric 'objectpendingfinalization-count' gives us the approximate amount of objects for which finalization is pending.

Deadlocked threads

Get information on the number of threads in deadlock waiting to acquire object monitors or ownable synchronizers using the metric 'deadlockedthreads'.

Threads started

Get information on the number of threads created and also started since the JVM started using the metric 'totalstartedthreadcount'.

Daemon threads

Get information on the number of live daemon threads using the metric 'daemonthreadcount'.

Monitor deadlocked threads

Get information on the number of threads in deadlock waiting to acquire object monitors using the metric 'monitordeadlockedthreads'.

Current thread user time

Get information on the CPU time for a thread executed in user mode using the metric 'currentthreadusertime'.

Peak thread count

Get information on the peak live thread count since the JVM started or peak was reset using the metric 'peakthreadcount'.

Thread count

Get information on the number of live threads including daemon and non-daemon threads using the metric 'threadcount'.

Current thread CPU time

Get information on the total CPU time for the current thread in nanoseconds using the metric 'currentthreadcputime'.

Connection leaks

Use the metric 'numpotentialconnleak' and get the number of potential connection leaks possible.

Logical connection released

Use the metric 'numconnreleased' and get the number of possible logical connections released to the pool.

Queued connection requests

Use the metric 'waitqueuelength' and get the number of connection requests in the queue waiting to be serviced.

Free connections

Use the metric 'numconnfree' and get the number of free connections in the pool.

Connection wait-time

Use the metric 'averageconnwaittime' and get the average wait-time duration per successful connection request.

Connections timed out

Use the metric 'numconntimedout' and get the number of connections in the pool that timed out from start time.

Connections created

Use the metric 'numconncreated' and get the total number of physical connections that were created since the last reset.

Setup

Prerequisites

  • Download and install the Site24x7 server monitoring agent (Linux | Windows) on the server where you plan to run the plugin.
  • Ensure you have Python 3 or a higher version running in your server.

Plugin installation

  • Create a folder named glassfish.
  • Download the glassfish.py and the glassfish.cfg files from our GitHub repository and place them in the glassfish folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/glassfish/glassfish.py && sed -i "1s|^.*|#! $(which python3)|" glassfish.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/glassfish/glassfish.cfg
  • To check if the plugin is working, execute the command below with appropriate arguments, and check for a valid JSON output with applicable metrics and their corresponding values.
    python3 glassfish.py --host "hostname" --port "port no" --username "username" --password "password" --ssl "false" --insecure "false"
  • Add the applicable configurations in the glassfish.cfg file.
    [localhost] host="localhost"
    port="4848"
    ssl="false"
    insecure="false"
    username="None"
    password="None"

    Note for the configurations above:

    host: The IP address or domain name of the server you're trying to connect to.

    port: Admin port of the Glassfish server.

    ssl: Connect with https if "true" and http if "false".

    insecure: If this parameter is set to "true", it allows you to connect even if the certificate is invalid. This should only be used in testing environments.

    username and password: These credentials are required if any form of authentication set up for the server.

  • Follow the steps in this article to learn how to run the Python script on Windows Server. You don't need to do this for Linux.
  • Move the glassfish folder to the Site24x7 server monitoring plugin directory:
  • For Linux: /opt/site24x7/monagent/plugins/ For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\

The agent will automatically execute the plugin within five minutes and display performance data in Site24x7.

  • Log in to Site24x7.
  • Navigate to Plugins and click the required monitor.

Related plugins:

  • Redis plugin - Monitor performance metrics of your Redis databases
  • MongoDB plugin - Monitor performance metrics of your MongoDB databases
  • Memcached plugin - Analyze performance of your Memcached server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes