Previously downloaded dubbo-admin-master source, there dubbo-monitor-simple project, empathy, using maven command packaged into an executable jar package:
1. Enter dubbo-monitor-simple project directory packaged (win8 administrator privileges to use the command line to open the cmd command again to perform packaging)
2. The package is completed, generate a dubbo-monitor-simple-2.0.0-assembly.tar.gz file
The dubbo-monitor-simple-2.0.0-assembly.tar.gz this compressed packet copied to the specified directory and extract
Conf directory is dubbo.properies profile
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You 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-monitor dubbo.application.name=simple-monitor dubbo.application.owner=dubbo #dubbo.registry.address=multicast://224.5.6.7:1234 dubbo.registry.address=zookeeper://127.0.0.1:2181 #dubbo注册中心的地址,这里不用做修改 #dubbo.registry.address=redis://127.0.0.1:6379 #dubbo.registry.address=dubbo://127.0.0.1:9090 dubbo.protocol.port=7070 #监控中心与dubbo服务的通信端口 dubbo.jetty.port=8080 #dubbo监控中心的web访问端口 dubbo.jetty.directory=${user.home}/monitor dubbo.charts.directory=${user.home}/monitor/charts dubbo.statistics.directory=${user.home}/monitor/statistics dubbo.log4j.file=logs/dubbo-monitor-simple.log dubbo.log4j.level=WARN
3.进入assembly/bin目录,双击start.bat启动监控中心
4.访问监控中心:
点击applications,可以看到监控的服务信息:
5. 在代码中配置监控中心: