Oracle GlassFish Server 3.0.1 Monitoring Scripting Client Installation and Quick Start Guide

Obtaining Information About Events That Provide Monitoring Data

Components and services that are deployed in the GlassFish Server typically generate statistics that the GlassFish Server can gather at run time. To provide statistics to GlassFish Server, components define events for the operations that generate these statistics. At runtime, components send these events when performing the operations for which the events are defined. For example, to enable the number of received requests to be monitored, a component sends a “request received” event each time that the component receives a request.

Monitoring Scripting Client enables you to list all events that are provided for monitoring GlassFish Server. Detailed information about each of these events is provided to enable you to identify which events provide the statistics that you want to monitor.

Use this information to process appropriately the events of interest in JavaScript programs that you write for monitoring GlassFish Server.

ProcedureTo Obtain a List of Events That Provide Monitoring Data

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Ensure that monitoring is enabled for GlassFish Server.

    If monitoring for GlassFish Server is disabled, no events are listed.

    For information about how to enable monitoring for GlassFish Server, see To Enable Monitoring in Oracle GlassFish Server 3.0.1 Administration Guide.

  3. To include in the list events that are related to a container, ensure that the container is loaded.

    Events that are related to a container are listed only if the container is loaded. For example, to list events that are related to the JRuby container, you must ensure that the JRuby container is loaded by deploying a JRuby application in GlassFish Server.

  4. Run the list-probes subcommand.

    The signatures of all events for all installed components of GlassFish Server are displayed.

    An event signature consists of the event identifier (ID) followed in parentheses by a comma-separated list of the event's parameters. Each parameter is listed as its type followed by its name.

    For detailed information about the format of an event signature, see the help page for the list-probes subcommand.


Example 1–2 Listing All Events

This command lists all events for monitoring GlassFish Server. For better readability, some events that would listed by this example are not shown.


asadmin> list-probes
glassfish:jdbc:connection-pool:connectionRequestDequeuedEvent (java.lang.String 
poolName)
glassfish:jca:connection-pool:connectionsFreedEvent (java.lang.String poolName, 
int count)
glassfish:transaction:transaction-service:deactivated ()
glassfish:kernel:connections-keep-alive:incrementCountFlushesEvent (java.lang.String 
listenerName)
glassfish:kernel:file-cache:countInfoMissEvent (java.lang.String fileCacheName)
glassfish:ejb:timers:timerRemovedEvent ()
glassfish:jdbc:connection-pool:decrementNumConnFreeEvent (java.lang.String poolName)

...
glassfish:kernel:thread-pool:threadAllocatedEvent (java.lang.String monitoringId, 
java.lang.String threadPoolName, java.lang.String threadId)
glassfish:jca:connection-pool:connectionCreatedEvent (java.lang.String poolName)
glassfish:kernel:connection-queue:connectionAcceptedEvent (java.lang.String 
listenerName, int connection)

Command list-probes executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-probes at the command line.

ProcedureTo Obtain Detailed Information About an Event That Provides Monitoring Data

The following detailed information is available about events for monitoring GlassFish Server:

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. If necessary, obtain the event ID of the event for which you want detailed information.

    For details, see To Obtain a List of Events That Provide Monitoring Data.

  3. Specify the --details option of the list-probes subcommand and the ID of the event as the operand of the subcommand.


Example 1–3 Displaying Detailed Information About an Event

This example displays detailed information about the glassfish:web:web-module:webModuleStartedEvent event.


asadmin list-probes --details glassfish:web:web-module:webModuleStartedEvent

Information similar to the following is displayed.


Events       glassfish:web:web-module:webModuleStartedEvent(5GFP)

NAME
     glassfish:web:web-module:webModuleStartedEvent - web  module
     started event

SYNOPSIS
     glassfish:web:web-module:webModuleStartedEvent(
     java.lang.String appName,
     java.lang.String hostName)

DESCRIPTION
     This event is sent whenever an application has been  started
     (for example, as part of its deployment).

PARAMETERS
     appName

         The name of the web application that has been started.

     hostName
         The name of the virtual server on which the  application
         has been deployed.

Java EE 6           Last change: 19 Nov 2009                    1


Command list-probes executed successfully.