SourceForge has been redesigned. Learn more.
Close

#276 New org.jboss.monitor.services.MemoryMonitor service

v3.2
open
nobody
None
5
2004-03-10
2004-03-10
No

First version of a MemoryMonitor service.

Introduces also the notion of a "stateful" alarm. Stateful
alarm notifications
(org.jboss.monitor.alarm.AlarmNotification) carry

severity -> CLEARED, WARNING, MINOR, MAJOR,
CRITICAL, UNKNOWN (modeled after ITU-T X.733)

and alarmState -> CREATED, CHANGED, CLEARED.

Thus, you don't get separate notification types for
crossing different thresholds. You simply
get "jboss.alarm.memory.low" and by examining the
severity field you can tell the active state of the alar m
(CLEARED, WARNING, CRITICAL for this particular type).

Also note it is possible to configure the number of
samples in the Warning area before emitting a
notification. This is to avoid spikes that result
temporarily in low memory conditions.

Enjoy
/Dimitris

See monitoring-service.xml for example:

<!--
Example of listening for notifications from the
MemoryMonitor

MemoryMonitor monitors the free JVM memory and
emits JMX Notifications
(org.jboss.monitor.alarm.AlarmNotification) when
certain thresholds
are crossed.

The following attributes may be set:

FreeMemoryWarningThreshold
- e.g. 1048576, or 1000k, or 1m
FreeMemoryCriticalThreshold
- like above, must be lower
SamplingPeriod
- e.g. 5000, or 5sec.
TriggeringWarningMeasurements
- number of measurements in the warning area to
trigger a notification

AlarmNotification carries alarmState and alarmSeverity.
alarmSeverity takes the values CLEARED, WARNING,
CRITICAL for this monitor.
See org.jboss.monitor.alarm.Alarm

The NotificationListener is simply used to output the
alarm on the console.
-->
<!--
<mbean
code="org.jboss.monitor.services.MemoryMonitor"
name="jboss.monitor:service=MemoryMonitor">

<attribute
name="FreeMemoryWarningThreshold">17m</attribute>
<attribute
name="FreeMemoryCriticalThreshold">16m</attribute>
</mbean>

<mbean
code="org.jboss.monitor.services.NotificationListener"
name="jboss.monitor:service=NotificationListener">

<attribute name="SubscriptionList">
<subscription-list>
<mbean
name="jboss.monitor:service=MemoryMonitor">
<notification type="jboss.alarm.memory.low"/>
</mbean>
</subscription-list>
</attribute>
</mbean>
-->

Discussion


Log in to post a comment.