Getting Started with the Java Dynamic Management Kit 4.2

Monitoring

The monitoring service complies with the JMX specification and provides a polling mechanism based on the value of MBean attributes. There are three monitor MBeans, one for counter attributes, another for gauge-like attributes, and a third for strings. These monitors send notifications when the observed attribute meets certain conditions, mainly equalling or exceeding a threshold.

Monitor MBeans observe the variation of an MBean attribute's value over time. All monitors have a configurable granularity period that determines how often the attribute is polled. Each of the monitors has specific settings for the type of the observed attribute:

Monitor notifications contain the name of the observed MBean, the name of the observed attribute, the value which triggered the event, as well as the previous value for comparison. Using this information, listeners know which MBean triggered an event, and they don't need to access the MBean before taking the appropriate action.

Monitor MBeans may also send notifications when certain error cases are encountered during an observation.