druid监控每个服务数据库连接数和SQL执行效率
时间:2021-07-01 10:21:17
帮助过:31人阅读
>com.alibaba.druid.support.http.StatViewServlet</servlet-
class>
<!-- 远程访问JavaSE项目使用jmx连接 -->
<init-param>
<param-name>jmxUrl</param-name>
<param-value>service:jmx:rmi:
///jndi/rmi://192.168.9.135:4090/jmxrmi</param-value>
</init-param>
<init-param>
<param-name>loginUsername</param-name>
<param-value>admin</param-value>
</init-param>
<init-param>
<param-name>loginPassword</param-name>
<param-value>admin</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>DruidStatView</servlet-name>
<url-pattern>/druid
/*</url-pattern>
</servlet-mapping>
添加完后重启tomcat。
5、浏览器访问tomcat地址,如:http://192.168.1.131:8081/druid/login.html,默认用户名:admin 密码:admin
6、数据源监控情况
7、SQL监控情况
druid监控每个服务数据库连接数和SQL执行效率
标签:use init 数据源 bsp htm href 目录 map user