Application Server: Health System: Tracking And Reporting Anomalies

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 00:00, 25 January 2012

Heart-48.pngCookbook-48.png

Monitoring Application Server Health Through Statistical Analysis of JMX Attributes

Resin's health system provides many useful tools to monitor, report, and alert on the health of your application server. Monitoring of all the typical metrics such as high cpu, low memory, deadlocked threads, etc, is pre-configured for you in health.xml. We also include appropriately conservative remediation actions in health.xml, such as triggering thread dumps, heap dumps, and restarts when necessary. It's up to you to tweak these settings to increase or decrease the aggressiveness of the health system as you see appropriate.


Resin goes beyond typical metrics monitoring through the tracking and analysis of JMX attributes.


Any numeric attribute of any MBean in JMX can be configured as Meter in Resin, which then enables:

  • Persistent historical tracking
  • Visual graphing in resin-admin
  • Visual graphing in PDF reports
  • Cluster wide reporting
  • Health monitoring
  • Anomaly analysis and logging
  • Triggering health actions (heap dump, thread dump, restart, etc)

JMXMeter and JMXDeltaMeter

Meters are typically configured in health.xml as a child of <resin>. health.xml includes quite a few pre-configured meters you can use as examples in addition to the examples below.

<health:JmxMeter>
  <name>JVM|Memory|Loaded Classes</name>
  <objectName>java.lang:type=ClassLoading</objectName>
  <attribute>LoadedClassCount</attribute>
</health:JmxMeter></nowiki>

In this example we've created a meter on the attribute LoadedClassCount on the MBean java.lang:type=ClassLoading. This is a nice attribute to track, since it reports on the loading of Java classes into memory.

Personal tools
TOOLBOX
LANGUAGES