Class JVMUptimeServletContextListener

java.lang.Object
kieker.monitoring.probe.servlet.AbstractRegularSamplingServletContextListener
kieker.monitoring.probe.servlet.JVMUptimeServletContextListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class JVMUptimeServletContextListener
extends AbstractRegularSamplingServletContextListener

Starts and stops the periodic logging of JVM uptime.
The initial delay and the sampling period (both given in seconds) can be configured via context-params in the web.xml file, as shown below.

The integration and configuration in a web.xml file works as follows:

 
  <web-app>
  ...

 <context-param>
  <param-name>JVMUptimeServletContextListener.samplingIntervalSeconds</param-name>
  <param-value>15</param-value>
 </context-param>

  <context-param>
   <param-name>JVMUptimeServletContextListener.initialSamplingDelaySeconds</param-name>
  <param-value>0</param-value>
 </context-param>

 <listener>
   <listener-class>
     kieker.monitoring.probe.servlet.JVMUptimeServletContextListener
   </listener-class>
 </listener>

 ...
 </web-app>
 }
 

Since:
1.10
Author:
Nils Christian Ehmke