dev@glassfish.java.net

Update on Monitoring in V3

From: Prashanth Abbagani <Prashanth.Abbagani_at_Sun.COM>
Date: Wed, 15 Jul 2009 15:52:05 -0700

Hello,

The monitoring in V3 is now integrated and working with several stats
from various module showing up. See the instructions towards the end to
which explain on how to view these stats.

Following are the features of monitoring that were accomplished before
the soft-code freeze deadline.

   1. Monitoring Probe Providers bundled by the module owners are
      discovered automatically and processed so probes are being fired
      when it visits module's code path
   2. Following is done with the monitoring StatsProviders which listens
      to the probes and updates the statistics
         1. We process the statsProviders (annotations) for the stats
            you have annotated to be exposed
         2. Exposing the stats through CLI (asadmin)
         3. Exposing the stats with REST
         4. GUI team is working on exposing these stats for some of the
            critical modules
         5. Integrate with Gmbal to expose these stats as JMX/AMX MBeans
         6. We also are ensuring backward compatibility for all the V2
            level stats
         7. Handling of config changes (from CLI,GUI or REST), so the
            stats get enabled/disabled automatically
   3. We are using BTrace as our underlying infrastructure to do the
      byte-code instrumentation of the provider classes so the probes
      are fired and the registered listeners (StatsProviders) are called.

_Steps to see the monitoring in action
_
You will need the BTrace agent running. You will need to start the
server with the following agent option (See Issue 8706
<https://glassfish.dev.java.net/issues/show_bug.cgi?id=8706>, you
shouldn't need this step once its fixed.)
/
$>java
-javaagent:/space/GFV3_BLD/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=dumpClasses=true,unsafe=true
-jar glassfishv3/glassfish/modules/glassfish.jar/

To see the monitoring stats, you will have to turn on monitoring for the
interested modules (see the attached script to turn them all to ON)

There are various ways to see your stats,

   1. REST - http://localhost:4848/monitoring/domain
   2. asadmin - ./asadmin get --monitor=true "*"
   3. JMX/AMX - Use JConsole to connect to 'localhost:8686'


Let us know if you run into any issues or if you have any questions.

thanks
Prashanth





#!/bin/sh
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.connector-connection-pool=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.connector-service=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.ejb-container=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.http-service=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.jdbc-connection-pool=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.jms-service=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.jvm=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.orb=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.thread-pool=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.transaction-service=HIGH
./asadmin set configs.config.server-config.monitoring-service.module-monitoring-levels.web-container=HIGH