Javamelody is an opensource (LGPL) application to monitor Java or Java EE application servers in QA and production environments.
JavaMelody is mainly based on statistics of requests and on evolution charts.
(Extract from the Javamelody home page)
You can even execute garbage collection to free resources, or view / invalidate http sessions.
Download the javamelody-1.36.0.zip zip file.
Now, unzip, and add copy the files javamelody.jar and jrobin-x.jar into the in the lib directory of Tomcat.
Step 2:
Add the following lines in the web.xml file of you application which you want to monitor.
JavaMelody is mainly based on statistics of requests and on evolution charts.
(Extract from the Javamelody home page)
- It allows to improve applications in QA and production
- Give facts about the average response times and number of executions
- Make decisions when trends are bad, before problems become too serious
- Optimize based on the more limiting response times
- Find the root causes of response times
- Verify the real improvement after optimization
- Number of executions, mean execution times and percentage of errors of http requests, sql requests, jsp pages or methods of business façades (if EJB3, Spring or Guice)
- Java memory
- Java CPU
- Number of user sessions
- Number of jdbc connections
You can even execute garbage collection to free resources, or view / invalidate http sessions.
Setting up Javamelody on your server
Step 1:Download the javamelody-1.36.0.zip zip file.
Now, unzip, and add copy the files javamelody.jar and jrobin-x.jar into the in the lib directory of Tomcat.
Step 2:
Add the following lines in the web.xml file of you application which you want to monitor.
<filter>
<filter-name>monitoring</filter-name>
<filter-
class
>net.bull.javamelody.MonitoringFilter</filter-
class
>
</filter>
<filter-mapping>
<filter-name>monitoring</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-
class
>net.bull.javamelody.SessionListener</listener-
class
>
</listener>
Once this is done, all you need to do is restart the server.
Once the application is up, navigate to
http://<host>/<context>/monitoring url to view a whole set
of interesting data.
The full instructions are available here.
The full instructions are available here.
Comments
Post a Comment