welcome to xlongwei.com

欢迎大家一起学习、交流、分享


QQ群:162333776 邮箱:admin@xlongwei.com

dubbo admin and monitor 服务治理和监控部署


分类 Java   关键字 分享   标签 dubbo   发布 hongwei  1433211935467
注意 转载须保留原文链接,译文链接,作者译者等信息。  
dubbo admin and monitor 服务治理和监控部署,dubbo-admin.war可以部署到独立的tomcat且上下文为根目录/,dubbo-monitor.tar.gz可以独立运行sh bin/start.sh。
# wget http://tool.xlongwei.com/softwares/dubbo-admin-2.5.4-SNAPSHOT.war
# mkdir dubbo-admin
# cd dubbo-admin
# jar xvf dubbo-admin-2.5.4-SNAPSHOT.war
# vi WEB-INF/dubbo.properties
dubbo.registry.address=redis://127.0.0.1:6379
dubbo.admin.root.password=root

# vi tomcat/conf/server.xml #上下文为根目录/,端口可以考虑8071
<Context docBase="/usr/local/dubbo-admin" path="" />

dubbo-monitor.tar.gz可以独立运行
# wget http://tool.xlongwei.com/softwares/dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz
# tar zxvf dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz
# mv dubbo-monitor-simple-2.5.4-SNAPSHOT monitor
# vi monitor/conf/dubbo.properties
dubbo.container=log4j,spring,registry,jetty
dubbo.application.name=simple-monitor
dubbo.application.owner=
dubbo.registry.address=redis://127.0.0.1:6379
dubbo.protocol.port=7070
dubbo.jetty.port=8070 #开放端口8070
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

# sh monitor/bin/start.sh

consumer和provider配置
# dubbo.properties,如果使用zookeeper注册中心,可以配置为从注册中心获得监控中心的地址
dubbo.monitor.protocol=registry
# dubbo.xml,如果使用redis注册中心,建议配置直连监控中心
<dubbo:monitor protocol="dubbo" address="10.29.86.191:7070" />

参考文档:http://dubbo.io/Administrator+Guide-zh.htmhttps://github.com/alibaba/dubbo

笔者对于服务的监控和治理也未得要领,还是优先部署服务分布式运行吧!
参考:dubbo分布式配置实例dubbo配置redis注册中心