1、下载ehcache-monitor模块
http://ehcache.org/downloads/monitor最新版:ehcache-monitor-kit-1.0.3-distribution.tar
现在下载都要注册了,开发测试免费,但是监控服务器的话,每间隔三天就要重启监控应用服务器,不然无法监控。
2、解压ehcache-monitor-kit-1.0.3-distribution.tar
把ehcache-monitor-kit-1.0.3-distribution\lib\ehcache-probe-1.0.3.jar复制到要监控的应用WEB-INF\lib\下
3、修改ehcache.xml文件,添加监控配置
<cacheManagerPeerListenerFactory
class="org.terracotta.ehcachedx.monitor.probe.ProbePeerListenerFactory"
properties="monitorAddress=localhost, monitorPort=9889, memoryMeasurement=true" />