天天看點

dubbo monitor 簡易版安裝

1.修改項目配置

vim /xx/WEB-INF/classes/dubbo.properties

dubbo.monitor.protocol=registry

2.dubbo-monitor 配置

##

# Copyright 1999-2011 Alibaba Group.

#  

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#      http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

dubbo.container=log4j,spring,registry,jetty

dubbo.application.name=simple-monitor

dubbo.application.owner=

dubbo.registry.address=zookeeper://ip1:2181?backup=ip2:2182,ip3:2183

#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.protocol.port=7070

dubbo.jetty.port=9090

dubbo.jetty.directory=data/monitor

dubbo.charts.directory=${dubbo.jetty.directory}/charts

dubbo.statistics.directory=${dubbo.jetty.directory}/statistics

#dubbo.jetty.directory=${user.home}/monitor

#dubbo.jetty.directory=/root/monitor

#dubbo.charts.directory=${dubbo.jetty.directory}/charts

#dubbo.statistics.directory=/root/monitor/statistics

dubbo.registry.group=xx 

dubbo.monitor.name=xx  (這兩個xx跟項目一緻就行)

dubbo.log4j.file=logs/dubbo-monitor-simple.log

dubbo.log4j.level=WARN

3.建立目錄

cd /home/dm/dubbo-monitor-simple-2.5.3

mkdir -p data/monitor

mkdir -p data/monitor/{statistics,charts}

4.通路http://ip:9090/

注意的問題,你可能會遇到的坑。

1.問題已解決,又新下載下傳了一個dubbo-monitor的war包(之前已經下載下傳n個),本地啟動後,沒有任何問題。經過對比之後發現,其下的dubbo-2.8.4.jar的大小不一樣,更換後發現,同樣沒有再報錯。不知道為什麼同樣的版本的jar,大小會不一樣,可能打包的人做了什麼更改吧。總之保持自己服務引用的jar版本和dubbo-monitor下的版本保持一緻,應該就不會有問題了。僅此獻給受到同樣困擾的後人!

2.https://github.com/alibaba/dubbo/issues/237

<a href="http://s1.51cto.com/wyfs02/M01/8A/6A/wKiom1guyuDgwbuXAACW3-CTfOY926.png" target="_blank"></a>

本文轉自 liqius 51CTO部落格,原文連結:http://blog.51cto.com/szgb17/1874420,如需轉載請自行聯系原作者