dev@glassfish.java.net

Re: V3 Monitoring questions

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Wed, 26 Aug 2009 18:27:12 -0700

Jennifer Chou wrote:
> Marina Vatkina wrote:
>
>> Jennifer Chou wrote:
>>
>>> Marina Vatkina wrote:
>>>
>>>> Monitoring team,
>>>>
>>>> I'm working on enabling ejb monitoring, which (besides call flow
>>>> data) is tracked on per bean or bean method, and in v2 terms was the
>>>> sub-tree of server.applications, added to is via a special registry.
>>>>
>>>> Q1. How do I do it in V3?
>>>>
>>>> Q1a. Which names would I use?
>>>
>>>
>>> The names for what? Can you give an example?
>>
>>
>> PluginPoint.XXX.
>>
>> There is (I think) some generic code in v2 that inserted
>> "bean-methods" (in other monitoring items there are other strings)
>> between the <app-name>.<module-name>.<bean-name> and the stringified
>> method signature:
>>
>> server.applications.ejb-flush-testApp.ejb-flush-test-ejb\.jar.A2.bean-methods.create-java\.lang\.String.dotted-name
>>
>
> So it would be like..
> PluginPoint = PluginPoint.APPLICATIONS

What is the difference btw SERVER and APPLICATIONS?


> subTreeNode = appName + "/" moduleName + "/" + beanName +
> "/bean-methods/" + methodSignature
>
> So we can use the same v2 code to generate the dotted name so it's the
> same as v2.

Which code converted method into the methodSignature? Do we have it in v3?

>
>>>
>>>>
>>>> Q2. CallFlowInfo - this type was used in v2 to pass around the data.
>>>> Do I replace it with all its elements or is there a plan to move it
>>>> to gmbal, so that it becomes a type that can be used outside GF
>>>> source tree?
>>>
>>>
>>> For this CallFlowInfo type, you need to implement ||
>>> |org.glassfish.external.statistics.Statistic, and optionally
>>> ||org.glassfish.external.statistics.Stats.|
>>
>>
>> CallFlowInfo is (was?) a generic monitoring interface:
>> ./common/common-util/src/main/java/com/sun/enterprise/admin/monitor/callflow/CallFlowInfo.java
>>
>>
>>>
>>> Please see Sreeni's write-up,
>>> http://appserver.sfbay.sun.com/Wiki.jsp?page=Monitorig_stat_usage,
>>> for help on how to create module specific statistics.
>>> Here's the link to the API which is also linked from the write-up:
>>> http://kenai.com/projects/gmbal/sources/gf_common/show/src/org/glassfish/external/statistics
>>>
>>>
>>>>
>>>> Q3. Can I separate @ManagedAttribute methods from @ProbeListener, so
>>>> that they are in 2 different classes?
>>>
>>>
>>> yes I believe you should be able to.
>>
>>
>> Will both classes be marked as @ManagedObject?
>
> only the one with @ManagedAttribute methods.

Did you try it? I'm getting NPE from 'asadmin get --monitor=true "*"' so I can't
even check in my code :(

java.lang.NullPointerException
         at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)
         at
org.glassfish.external.statistics.impl.StatisticImpl.getStaticAsMap(StatisticImpl.java:82)
         at
org.glassfish.external.statistics.impl.CountStatisticImpl.getStaticAsMap(CountStatisticImpl.java:75)
         at
com.sun.enterprise.v3.admin.GetCommand.addStatisticInfo(GetCommand.java:216)
         at
com.sun.enterprise.v3.admin.GetCommand.insertNameValuePairs(GetCommand.java:203)
         at
com.sun.enterprise.v3.admin.GetCommand.getMonitorAttributes(GetCommand.java:182)
         at com.sun.enterprise.v3.admin.GetCommand.execute(GetCommand.java:100)

>
>>
>> thanks,
>> -marina
>>
>>>
>>>>
>>>> Q4. How can I pre-set which @ProbeListener (or Statistic instance)
>>>> is being monitored on level LOW vs. HIGH?
>
> You may want to check with Shalini - they are doing this for jdbc.

ok. thanks.

-marina
>
>>>>
>>>> thank you,
>>>> -marina
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>