users@glassfish.java.net

Re: Monitor Self Management Rules, Granularity Units?

From: jsexton0 <jsexton0_at_gmail.com>
Date: Mon, 9 Nov 2009 07:26:42 -0800 (PST)

Hello -

I found this follow-up blog post that completely explains the problem I had.

http://blogs.sun.com/technical/entry/management_rules_observedmbean_property

It's all working now, by using "observedmbean" instead of "observedobject"
in the rule. I don't fully understand the distinction between the two, or
is it simply a problem with the admin GUI? I don't know. But
"observedobject" seems to be problematic?

Thanks


sankara rao bhogi wrote:
>
>
>
> You mean Obeserved MBean's getFreeMemory() is not even called once? When
> the action is invoked, can you print Notification object.
>
> This is implemented in terms of javax.management.monitor.GauageMonitor
> and you can expect the following behavior:
>
> *
>
> A |GaugeMonitor|
>
> <http://java.sun.com/javase/6/docs/api/javax/management/monitor/GaugeMonitor.html>
> observes attributes of numerical type. Each observed attribute has
> an associated /high threshold/ and /low threshold/.
>
> When an observed attribute crosses the high threshold, if the
> /notify high/ flag is true, then a notification is sent.
> Subsequent crossings of the high threshold value will not trigger
> further notifications until the gauge value becomes less than or
> equal to the low threshold.
>
> When an observed attribute crosses the low threshold, if the
> /notify low/ flag is true, then a notification is sent. Subsequent
> crossings of the low threshold value will not trigger further
> notifications until the gauge value becomes greater than or equal
> to the high threshold.
>
> Typically, only one of the notify high and notify low flags is
> set. The other threshold is used to provide a /hysteresis/
> mechanism to avoid the repeated triggering of notifications when
> an attribute makes small oscillations around the threshold value.
>
> A |GaugeMonitor| can operate in /difference mode/. In this mode,
> the value compared against the high and low thresholds is the
> difference between two successive observations of an attribute.
>
>
> jsexton0 wrote:
>> Additional...
>>
>> The data source (observed) mbean is never called. Why? The action is
>> called once when the rule is activated. No error messages logged...
>> I am basing this on an example found here:
>>
>> https://glassfish.dev.java.net/javaee5/selfmanagement/selfmanagement_example.html
>>
>> This is the way the rule get written:
>>
>> <management-rules enabled="true">
>> <management-rule enabled="true" name="CMS_Memory_Rule">
>> <event level="WARNING" record-event="true" type="monitor">
>> <description>Memory Alert</description>
>> <property name="observedobject"
>> value="user:impl-class-name=com.iwsinc.cms.monitor.memory.CMSMemory,name=CMSMemoryMBean,server=server"/>
>> <property name="observedattribute" value="FreeMemory"/>
>> <property name="granularityperiod" value="1000"/>
>> <property name="monitortype" value="gaugemonitor"/>
>> <property name="differencemode" value="false"/>
>> <property name="numbertype" value="long"/>
>> <property name="lowthreshold" value="9000000"/>
>> <property name="highthreshold" value="9700000"/>
>> </event>
>> <action action-mbean-name="CMSMemoryAction"/>
>> <description>CMS_Memory_Rule</description>
>> </management-rule>
>> </management-rules>
>>
>> Any ideas?
>> Thank you
>>
>>
>> jsexton0 wrote:
>>
>>> Hello -
>>>
>>> I made a monitor-type self management rule. It functions, but it seems
>>> to
>>> only get called once when the rule is activated at start up. I added
>>> some
>>> logging so I should be able to see when the observedobject is used.
>>>
>>> What units is the granularityperiod parameter in? I figured it for
>>> milliseconds and used 1000. Is it seconds?
>>>
>>> I've got no error messages or anything in the log. It just seems to
>>> only
>>> call the monitor object once.
>>>
>>> Thanks
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>

-- 
View this message in context: http://old.nabble.com/Monitor-Self-Management-Rules%2C-Granularity-Units--tp26216584p26268231.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.