JavaMelody system monitoring tool usage configuration

JavaMelody can monitor Java or Java EE application servers in QA and live production environments. And display in the form of graphs: Java memory and Java CPU usage, the number of user sessions, the number of JDBC connections, and the number of executions of http requests, sql requests, jsp pages and business interface methods (EJB3, Spring, Guice), and the average execution time. , error percentage, etc. Charts can be viewed by day, week, month, year or a custom time period.
The configuration is as follows:
1. Download the zip archive from http://code.google.com/p/javamelody/downloads/list
2. Unzip and copy javamelody.war to the Tomcat release directory
3. In the monitored project Add the following code to web.xml
<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>  

4. Copy javamelody.jar and jrobin-1.5.9.1.jar to the LIB directory of the monitored project
5. Start the Tomcat application server and access the javamelody application, such as http://localhost:8080/javamelody

ps: To monitor JDBC related status and action, you need to configure JDBC connection and interceptor separately, which is introduced in the official wiki
http://code.google.com/p/javamelody/wiki/UserGuide?tm=6#12._Struts_2_Actions

Here I choose in the hibernate connection configuration Configuration:
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
				<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
				<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
				<prop key="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop>
[b]				<prop key="hibernate.connection.driver_class">net.bull.javamelody.JdbcDriver</prop>
				<prop key="hibernate.connection.driver">com.microsoft.sqlserver.jdbc.SQLServerDriver</prop>[/b]				<prop key="hibernate.connection.url">${jdbc.url}</prop>
				<prop key="hibernate.connection.username">${jdbc.username}</prop>
				<prop key="hibernate.connection.password">${jdbc.password}</prop>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326746540&siteId=291194637