dev@glassfish.java.net

Re: Update on Monitoring in V3

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 16 Jul 2009 10:15:20 -0700

FYI, here are the MBeans I see with 4 simple apps deployed and
monitoring enabled.

jmxcmd> find -w pp=/mon* amx:
amx:pp=/mon,type=server-mon,name=server
amx:pp=/mon/server-mon[server],type=EjbSecurityStatsProvider,name=ejb-
security
amx:pp=/mon/server-mon[server],type=HttpServiceStatsProvider,name=http-
service/__asadmin/request
amx:pp=/mon/server-mon[server],type=HttpServiceStatsProvider,name=http-
service/server/request
amx:pp=/mon/server-
mon[server],type=JVMClassLoadingStatsProvider,name=jvm/class-loading-
system
amx:pp=/mon/server-
mon[server],type=JVMCompilationStatsProvider,name=jvm/compilation-system
amx:pp=/mon/server-mon[server],type=JVMGCStatsProvider,name=jvm/
garbage-collectors/ConcurrentMarkSweep
amx:pp=/mon/server-mon[server],type=JVMGCStatsProvider,name=jvm/
garbage-collectors/ParNew
amx:pp=/mon/server-mon[server],type=JVMMemoryStatsProvider,name=jvm/
memory
amx:pp=/mon/server-mon[server],type=JVMOSStatsProvider,name=jvm/
operating-system
amx:pp=/mon/server-mon[server],type=JVMRuntimeStatsProvider,name=jvm/
runtime
amx:pp=/mon/server-mon[server],type=JspStatsProvider,name=applications/
generic-ra/server
amx:pp=/mon/server-mon[server],type=JspStatsProvider,name=applications/
hello1/server
amx:pp=/mon/server-mon[server],type=JspStatsProvider,name=applications/
showArgs/server
amx:pp=/mon/server-mon[server],type=JspStatsProvider,name=applications/
stateless-simple/server
amx:pp=/mon/server-mon[server],type=JspStatsProvider,name=web/jsp
amx:pp=/mon/server-
mon[server],type=LoginStatsProvider,name=webintegration/hello1
amx:pp=/mon/server-
mon[server],type=LoginStatsProvider,name=webintegration/stateless-simple
amx:pp=/mon/server-mon[server],type=RealmStatsProvider,name=realm
amx:pp=/mon/server-
mon[server],type=ServletStatsProvider,name=applications/generic-ra/
server
amx:pp=/mon/server-
mon[server],type=ServletStatsProvider,name=applications/hello1/server
amx:pp=/mon/server-
mon[server],type=ServletStatsProvider,name=applications/showArgs/server
amx:pp=/mon/server-
mon[server],type=ServletStatsProvider,name=applications/stateless-
simple/server
amx:pp=/mon/server-mon[server],type=ServletStatsProvider,name=web/
servlet
amx:pp=/mon/server-
mon[server],type=SessionStatsProvider,name=applications/generic-ra/
server
amx:pp=/mon/server-
mon[server],type=SessionStatsProvider,name=applications/hello1/server
amx:pp=/mon/server-
mon[server],type=SessionStatsProvider,name=applications/showArgs/server
amx:pp=/mon/server-
mon[server],type=SessionStatsProvider,name=applications/stateless-
simple/server
amx:pp=/mon/server-mon[server],type=SessionStatsProvider,name=web/
session
amx:pp=/mon/server-
mon[server],type=WebRequestStatsProvider,name=applications/generic-ra/
server
amx:pp=/mon/server-
mon[server],type=WebRequestStatsProvider,name=applications/hello1/server
amx:pp=/mon/server-
mon[server],type=WebRequestStatsProvider,name=applications/showArgs/
server
amx:pp=/mon/server-
mon[server],type=WebRequestStatsProvider,name=applications/stateless-
simple/server
amx:pp=/mon/server-mon[server],type=WebRequestStatsProvider,name=web/
request
amx:pp=/mon/server-
mon[server],type=WebSecurityDeployerStatsProvider,name=web
amx:pp=/mon/server-
mon[server],type=WorkManagementStatsProvider,name=connector-service/
generic-ra/work-management


jmxcmd> get * last-found
---amx:pp=/mon/server-
mon[server],type=HttpServiceStatsProvider,name=http-service/server/
request---
Children={}
Name=http-service/server/request
Parent=amx:type=server-mon,name=server,pp=/mon
count200=Composite data:
count=0
description=Number of responses with a status code equal to 200
lastSampleTime=1247764352063
name=Count200
startTime=1247764352063
unit=count

count2xx=Composite data:
count=0
description=Number of responses with a status code in the 2xx range
lastSampleTime=1247764352063
name=Count2xx
startTime=1247764352063
unit=count

count302=Composite data:
count=0
description=Number of responses with a status code equal to 302
lastSampleTime=1247764352063
name=Count302
startTime=1247764352063
unit=count

count304=Composite data:
count=0
description=Number of responses with a status code equal to 304
lastSampleTime=1247764352063
name=Count304
startTime=1247764352063
unit=count

count3xx=Composite data:
count=0
description=Number of responses with a status code in the 3xx range
lastSampleTime=1247764352063
name=Count3xx
startTime=1247764352063
unit=count

count400=Composite data:
count=0
description=Number of responses with a status code equal to 400
lastSampleTime=1247764352063
name=Count400
startTime=1247764352063
unit=count

count401=Composite data:
count=0
description=Number of responses with a status code equal to 401
lastSampleTime=1247764352063
name=Count401
startTime=1247764352063
unit=count

count403=Composite data:
count=0
description=Number of responses with a status code equal to 403
lastSampleTime=1247764352063
name=Count403
startTime=1247764352063
unit=count

count404=Composite data:
count=0
description=Number of responses with a status code equal to 404
lastSampleTime=1247764352064
name=Count404
startTime=1247764352064
unit=count

count4xx=Composite data:
count=0
description=Number of responses with a status code in the 4xx range
lastSampleTime=1247764352064
name=Count4xx
startTime=1247764352064
unit=count

count503=Composite data:
count=0
description=Number of responses with a status code equal to 503
lastSampleTime=1247764352064
name=Count503
startTime=1247764352064
unit=count

count5xx=Composite data:
count=0
description=Number of responses with a status code in the 5xx range
lastSampleTime=1247764352064
name=Count5xx
startTime=1247764352064
unit=count

countother=Composite data:
count=0
description=Number of responses with other status codes
lastSampleTime=1247764352064
name=CountOther
startTime=1247764352064
unit=count

errorcount=Composite data:
count=0
description=Number of responses with a status code greater than 400
lastSampleTime=1247764352063
name=ErrorCount
startTime=1247764352063
unit=count

maxtime=Composite data:
count=0
description=Provides the longest response time for a response - not a
cumulative value, but the largest response time from among response
times.
lastSampleTime=0
maxTime=0
minTime=0
name=MaxTime
startTime=0
totalTime=0
unit=milliseconds

processingtime=Composite data:
count=0
description=Provides cumulative value of the times taken to process
each request The processing time is the average request processing
times over the request count.
lastSampleTime=0
maxTime=0
minTime=0
name=ProcessingTime
startTime=0
totalTime=0
unit=milliseconds

requestcount=Composite data:
count=0
description=Provides cumulative number of requests processed so far.
lastSampleTime=1247764481192
name=RequestCount
startTime=1247764481192
unit=count


---amx:pp=/mon/server-
mon[server],type=ServletStatsProvider,name=applications/generic-ra/
server---
Children={}
Name=applications/generic-ra/server
Parent=amx:type=server-mon,name=server,pp=/mon
activeservletsloadedcount=Composite data:
count=0
description=Number of currently loaded servlets
lastSampleTime=1247764406939
name=ActiveServletsLoaded
startTime=1247764406939
unit=count

maxservletsloadedcount=Composite data:
count=0
description=Maximum number of servlets loaded which were active
lastSampleTime=1247764406939
name=MaxServletsLoaded
startTime=1247764406939
unit=count

totalservletsloadedcount=Composite data:
count=0
description=Cumulative number of servlets that have been loaded into
the web module
lastSampleTime=1247764406939
name=TotalServletsLoaded
startTime=1247764406939
unit=count


---amx:pp=/mon/server-
mon[server],type=SessionStatsProvider,name=applications/showArgs/
server---
Children={}
Name=applications/showArgs/server
Parent=amx:type=server-mon,name=server,pp=/mon
activatedsessionstotal=Composite data:
count=0
description=Total number of activated sessions
lastSampleTime=1247764408961
name=ActivatedSessionsTotal
startTime=1247764408961
unit=count

activesessionscurrent=Composite data:
count=0
description=Number of currently active sessions
lastSampleTime=1247764408961



On Jul 15, 2009, at 3:52 PM, Prashanth Abbagani wrote:

> 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.
> 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
> Following is done with the monitoring StatsProviders which listens
> to the probes and updates the statistics
> We process the statsProviders (annotations) for the stats you have
> annotated to be exposed
> Exposing the stats through CLI (asadmin)
> Exposing the stats with REST
> GUI team is working on exposing these stats for some of the critical
> modules
> Integrate with Gmbal to expose these stats as JMX/AMX MBeans
> We also are ensuring backward compatibility for all the V2 level stats
> Handling of config changes (from CLI,GUI or REST), so the stats get
> enabled/disabled automatically
> 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, 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,
> REST - http://localhost:4848/monitoring/domain
> asadmin - ./asadmin get --monitor=true "*"
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team