从网上下载了一个dubbo监控中心,地址忘了,文件名是dubbo-monitor-simple-2.5.3-assembly.tar.gz。
修改监控中心配置文件如下:
dubbo.container=log4j,spring,registry,jetty dubbo.application.name=simple-monitor dubbo.application.owner= #dubbo.registry.address=multicast://224.5.6.7:1234 dubbo.registry.address=zookeeper://127.0.0.1:2181 #dubbo.registry.address=redis://127.0.0.1:6379 #dubbo.registry.address=dubbo://127.0.0.1:9090 #注册中心也是一个dubbo provider,也有端口,避免与本地的dubbo服务冲突 dubbo.protocol.port=7070 ## jetty端口 dubbo.jetty.port=9090 dubbo.jetty.directory=${user.home}/monitor dubbo.charts.directory=${dubbo.jetty.directory}/charts dubbo.statistics.directory=${user.home}/monitor/statistics dubbo.log4j.file=logs/dubbo-monitor-simple.log dubbo.log4j.level=WARN
bin目录下有启动脚本,start即可,启动监控中心后,访问地址是 localhost:9090
还需在provider和consumer的配置中加上:
<dubbo:monitor protocol="registry"/>