Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to set up monitoring and alerting for java server based app and want to find some best practices for monitoring JVM specific metrics and for designing alerts based on those metrics.

So what are the key JVM metrics to monitor? Some possible contenders:

  • Heap space used
  • CPU usage
  • GC frequency
  • Time spent in GC
  • Thread count
  • Class count
  • Object count

And once you start watching some metrics, what are good alerting strategies for said metrics? CPU usage seems like an easy one, but something like heap space seems good to monitor and be able to view, but it doesn't translate so well into an alertable metric as you expect it will grow to capacity, triggering GC. But something like time spent in GC, especially as a ratio to overall time seems like it has good alerting potential.

I'm not looking for a tool per se (ie. Hyperic or Nagios) to perform the monitoring, but if there is one that has an especially good Java template/default graph/rule set, that would be a handy pointer.

share|improve this question

I have used hprof before which bundled together with JRE. It does HEAP and CPU monitoring. I usually use it to monitor CPU usage and check which thread is taking majority of CPU. http://java.sun.com/developer/technicalArticles/Programming/HPROF.html

I also used JProbe before which is a commercial software. http://www.quest.com/jprobe/

share|improve this answer

Ruxit is monitoring and presenting JVM metrics in an infographics style. It provides insights regarding: CPU, Memory, Traffic, Retransmissions, Connectivity, Suspension, JVM You can see screenshots here: Java Monitoring

Ruxit uses baselining to only alert you when it is necessary. I'm obviously a bit biased as I work for Ruxit. But the infographics style for visualizing the metrics are really great.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.