Web Server: OpenSSL Cipher Suite

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
== Monitoring Application Server Health Through Statistical Analysis of JMX Attributes ==
 
== 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's [http://www.caucho.com/resin-4.0/admin/health.xtp 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 [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthCpuHealthCheck high cpu], [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthMemoryTenuredHealthCheck low memory], [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthJvmDeadlockHealthCheck deadlocked threads], etc, is pre-configured for you in health.xml.  We also include appropriately conservative remediation actions in health.xml, such as triggering [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthDumpThreads thread dumps], [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthDumpHeap heap dumps], and [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthRestart 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 by looking for anomalies in JMX attributes.'''''
 
'''''Resin goes beyond typical metrics monitoring by looking for anomalies in JMX attributes.'''''
  
Any numeric attribute of any MBean in JMX can be configured as ''Meter'' in Resin, which then enables:
+
 
 +
Any numeric attribute of any MBean in JMX can be configured as [http://www.caucho.com/resin-4.0/admin/health-meters.xtp Meter] in Resin, which then enables:
  
 
* Persistent historical tracking
 
* Persistent historical tracking
Line 16: Line 18:
 
* Anomaly analysis and logging
 
* Anomaly analysis and logging
 
* Triggering health actions (heap dump, thread dump, restart, etc)
 
* Triggering health actions (heap dump, thread dump, restart, etc)
 +
  
 
=== Creating a Meter ===
 
=== Creating a Meter ===
Line 27: Line 30:
 
  </health:JmxMeter>
 
  </health:JmxMeter>
  
In this example we've created a meter on the attribute BlockedCount on the MBean resin:type=JvmThreads.  This is an important attribute to track, since it reports blocked threads, which can indicate a serious issue when the value increases significantly.
+
In this example we've created a [http://www.caucho.com/resin-4.0/admin/health-meters.xtp#healthJmxMeter JMXMeter] on the attribute BlockedCount on the MBean resin:type=JvmThreads.  This is an important attribute to track, since it reports blocked threads, which can indicate a serious issue when the value increases significantly.
  
We also provide JMXDeltaMeter, which reports the difference between the current and previous attribute values.   
+
 
 +
We also provide [http://www.caucho.com/resin-4.0/admin/health-meters.xtp#healthJmxDeltaMeter JMXDeltaMeter], which reports the difference between the current and previous attribute values.   
  
 
  <health:JmxDeltaMeter>
 
  <health:JmxDeltaMeter>
Line 38: Line 42:
  
 
Above, a delta meter is created for compilation time, another important metric to monitor.
 
Above, a delta meter is created for compilation time, another important metric to monitor.
 +
 +
 +
''Please refer to to resin-doc on [http://www.caucho.com/resin-4.0/admin/health-meters.xtp Health Meters] for more information.''
 +
  
 
=== Analyzing a Meter ===
 
=== Analyzing a Meter ===
  
Meters alone are useful for manual inspection in resin-admin since every meter can be graphed.  However Resin provides an extremely useful automatic analysis tool called AnomalyAnalyzer.  AnomalyAnalyzer looks at the current meter value, checking for deviations from the average value.  So unusual changes like a spike in blocked threads can be detected
+
Meters alone are useful for manual inspection in resin-admin since every meter can be graphed.  However Resin provides an extremely useful automatic analysis tool called AnomalyAnalyzer.  AnomalyAnalyzer looks at the current meter value, checking for deviations from the average value.  So unusual changes like a spike in blocked threads can be detected.
  
 
  <health:AnomalyAnalyzer>
 
  <health:AnomalyAnalyzer>
Line 48: Line 56:
 
  </health:AnomalyAnalyzer>
 
  </health:AnomalyAnalyzer>
  
In this example we've created an AnomalyAnalyzer on the blocked thread meter we created above, and assigned it to the health event "caucho.thread.anomaly.jvm-blocked".  The health-event attribute is optional.  Without a health-event, an anomaly analyzer alone will log anomalies it detects to the resin log at WARNING level.  These will also show up in PDF reports, and shown below.
+
In this example we've created an AnomalyAnalyzer on the blocked thread meter we created above, and assigned it to the health event "caucho.thread.anomaly.jvm-blocked".  The health-event attribute is optional.  '''Without a health-event, an anomaly analyzer alone will only log anomalies it detects to the resin log at WARNING level'''.  These alerts will also show up in PDF reports, and shown below.
 +
 
 +
2012-01-20 16:10:00 AnomalyAnalyzer JVM|Thread|JVM Runnable Count WARNING value=3.000, deviation=9.487 sigma mean=2.011 std=0.104 n=92.0
  
(pdf screenshot)
 
  
 
=== Reacting to Anomalies ===
 
=== Reacting to Anomalies ===
  
Resin's health system provides a set of remediation actions that you can configure to automatically execute in reaction to an anomaly.  The <health-event> attribute we configured above allows us to tie health actions to a detected anomaly, as shown below:
+
Resin's health system provides a set of [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#Healthactions remediation actions] that you can configure to automatically execute in reaction to an anomaly.  The <health-event> attribute we configured above allows us to tie health actions to a detected anomaly, as shown below:
  
 
  <health:DumpThreads>
 
  <health:DumpThreads>
Line 61: Line 70:
 
  </health:DumpThreads>
 
  </health:DumpThreads>
  
In this example we've created a DumpThreads action with 2 conditions.  The first condition, IfHealthEvent, tells the action to execute only if the health event starts with "caucho.thread".  The send condition, IfNotRecent, prevents the action from executing more than once every 15 minutes.   
+
In this example we've created a [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthDumpThreads DumpThreads] action with 2 conditions.  The first condition, IfHealthEvent, tells the action to execute only if the health event starts with "caucho.thread".  The send condition, [http://www.caucho.com/resin-4.0/admin/health-checking.xtp#healthIfNotRecent IfNotRecent], prevents the action from executing more than once every 15 minutes.   
  
Here is the full example:
+
Here is the example in full:
  
 
  <resin xmlns="http://caucho.com/ns/resin"
 
  <resin xmlns="http://caucho.com/ns/resin"
Line 69: Line 78:
 
             xmlns:health="urn:java:com.caucho.health"
 
             xmlns:health="urn:java:com.caucho.health"
 
             xmlns:ee="urn:java:ee">
 
             xmlns:ee="urn:java:ee">
 
+
 
   <health:JmxMeter>
 
   <health:JmxMeter>
 
     <name>JVM|Thread|JVM Blocked Count</name>
 
     <name>JVM|Thread|JVM Blocked Count</name>
Line 75: Line 84:
 
     <attribute>BlockedCount</attribute>
 
     <attribute>BlockedCount</attribute>
 
   </health:JmxMeter>
 
   </health:JmxMeter>
 
+
 
   <health:AnomalyAnalyzer>
 
   <health:AnomalyAnalyzer>
 
     <meter>JVM|Thread|JVM Blocked Count</meter>
 
     <meter>JVM|Thread|JVM Blocked Count</meter>
 
     <health-event>caucho.thread.anomaly.jvm-blocked</health-event>
 
     <health-event>caucho.thread.anomaly.jvm-blocked</health-event>
 
   </health:AnomalyAnalyzer>
 
   </health:AnomalyAnalyzer>
 
+
 
   <health:DumpThreads>
 
   <health:DumpThreads>
 
     <health:IfHealthEvent regexp="caucho.thread"/>
 
     <health:IfHealthEvent regexp="caucho.thread"/>
Line 87: Line 96:
 
    
 
    
 
  </resin>
 
  </resin>
 +
 +
''[http://www.caucho.com/resin-4.0/admin/health.xtp Full documentation on Resin's Application Health System is available in the public resin-doc.]''

Revision as of 00:00, 25 January 2012

Heart-48.pngCookbook-48.png

Contents

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 by looking for anomalies in 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)


Creating a Meter

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|Thread|JVM Blocked Count</name>
  <objectName>resin:type=JvmThreads</objectName>
  <attribute>BlockedCount</attribute>
</health:JmxMeter>

In this example we've created a JMXMeter on the attribute BlockedCount on the MBean resin:type=JvmThreads. This is an important attribute to track, since it reports blocked threads, which can indicate a serious issue when the value increases significantly.


We also provide JMXDeltaMeter, which reports the difference between the current and previous attribute values.

<health:JmxDeltaMeter>
  <name>JVM|Compilation|Compilation Time</name>
  <objectName>java.lang:type=Compilation</objectName>
  <attribute>TotalCompilationTime</attribute>
</health:JmxDeltaMeter>

Above, a delta meter is created for compilation time, another important metric to monitor.


Please refer to to resin-doc on Health Meters for more information.


Analyzing a Meter

Meters alone are useful for manual inspection in resin-admin since every meter can be graphed. However Resin provides an extremely useful automatic analysis tool called AnomalyAnalyzer. AnomalyAnalyzer looks at the current meter value, checking for deviations from the average value. So unusual changes like a spike in blocked threads can be detected.

<health:AnomalyAnalyzer>
  <meter>JVM|Thread|JVM Blocked Count</meter>
  <health-event>caucho.thread.anomaly.jvm-blocked</health-event>
</health:AnomalyAnalyzer>

In this example we've created an AnomalyAnalyzer on the blocked thread meter we created above, and assigned it to the health event "caucho.thread.anomaly.jvm-blocked". The health-event attribute is optional. Without a health-event, an anomaly analyzer alone will only log anomalies it detects to the resin log at WARNING level. These alerts will also show up in PDF reports, and shown below.

2012-01-20 16:10:00 AnomalyAnalyzer JVM|Thread|JVM Runnable Count WARNING value=3.000, deviation=9.487 sigma mean=2.011 std=0.104 n=92.0


Reacting to Anomalies

Resin's health system provides a set of remediation actions that you can configure to automatically execute in reaction to an anomaly. The <health-event> attribute we configured above allows us to tie health actions to a detected anomaly, as shown below:

<health:DumpThreads>
  <health:IfHealthEvent regexp="caucho.thread"/>
  <health:IfNotRecent time="15m"/>
</health:DumpThreads>

In this example we've created a DumpThreads action with 2 conditions. The first condition, IfHealthEvent, tells the action to execute only if the health event starts with "caucho.thread". The send condition, IfNotRecent, prevents the action from executing more than once every 15 minutes.

Here is the example in full:

<resin xmlns="http://caucho.com/ns/resin"
           xmlns:resin="urn:java:com.caucho.resin"
           xmlns:health="urn:java:com.caucho.health"
           xmlns:ee="urn:java:ee">

  <health:JmxMeter>
    <name>JVM|Thread|JVM Blocked Count</name>
    <objectName>resin:type=JvmThreads</objectName>
    <attribute>BlockedCount</attribute>
  </health:JmxMeter>

  <health:AnomalyAnalyzer>
    <meter>JVM|Thread|JVM Blocked Count</meter>
    <health-event>caucho.thread.anomaly.jvm-blocked</health-event>
  </health:AnomalyAnalyzer>

  <health:DumpThreads>
    <health:IfHealthEvent regexp="caucho.thread"/>
    <health:IfNotRecent time="15m"/>
  </health:DumpThreads>
 
</resin>

Full documentation on Resin's Application Health System is available in the public resin-doc.

Personal tools
TOOLBOX
LANGUAGES