Using JMX classes to notify on events over time

Posted by Cincinnati Joe on Stack Overflow See other posts from Stack Overflow or by Cincinnati Joe
Published on 2010-06-17T23:27:23Z Indexed on 2010/06/17 23:33 UTC
Read the original article Hit count: 238

Filed under:
|
|

I've been looking at JMX for monitoring application and system metrics (partially because MBeans can accessed by various tools such as JConsole). It would seem like the classes included with JMX would be useful for things like notification when metrics have exceeded thresholds. But I'm not sure they fit with the way I want to measure these over a specified time period.

For example, let's say I want to notify an admin when the average CPU load is over 95% for more than 5 minutes. Is that something can be done with a GaugeMonitor? From the docs, it doesn't seem quite suited for this, and I'm wondering if instead I should write my own MBean with the necessary logic.

A more relevant example is when the login times for users exceed 10s over a period of 5 mins. Slightly different would be the last 20 logins took more than 10s on average. Another case would be when a process crashes 4+ times in an hour. Or the request queue exceeds 15 for 5 mins. Are the JMX Monitor classes useful for this kind of thing?

© Stack Overflow or respective owner

Related posts about monitor

Related posts about jmx