1.3 Dubbo之辅助系统(源码编译、管理控制台、监控平台)

1.Dubbo源码下载与编译

1.1 源码下载地址

https://github.com/apache/dubbo/tree/2.5.x?utm_source=csdn_toolbar
在这里插入图片描述

1.2 解压缩

在这里插入图片描述

1.3 cmd管理员身份运行

进入dubbo-2.5.10目录下执行 mvn clean package -Dmaven.test.skip=true 会生成如下结果**[注意:
以管理员身份进入]**
在这里插入图片描述

1.4 编译成功

在这里插入图片描述

1.5 检查一下我们需要的内容

在这里插入图片描述
在这里插入图片描述

2.管理控制台

开源的Dubbo服务管理控制台是阿里巴巴内部裁剪的版本,开源的部分功能包括:路由规则,动态配置,访问控制,权重调整,负载均衡等管理功能。

2.1 步骤一

将生成的dubbo-admin-2.5.10.war拷贝到web容器中并解压缩(此处使用tomcat8)

在这里插入图片描述

2.2 修改dubbo的属性文件

在这里插入图片描述

dubbo.registry.address=zookeeper://192.168.134.129:2181?
backup=192.168.134.131:2181,192.168.134.132:2181
dubbo.admin.root.password=root
dubbo.admin.guest.password=guest

2.3 启动Tomca即可

在这里插入图片描述

2.4 浏览器登录

登录地址:http://localhost:8080/dubbo-admin-2.5.10/
默认的账号密码:root root
在这里插入图片描述

3.监控平台

Dubbo-Monitor主要是用来统计服务和调用次数和调用时间,服务消费者和提供者,在内存中累计调用次数和调用时间,定时每分钟发送一次统计数据到监控中心,监控中心则使用绘制图表来显示

3.1 开启monitor服务

需要在服务提供者和消费者中开启monitor服务,我们只需要在对应的配置文件中添加相关信息

<!--开启监控-->
    <dubbo:monitor protocol="registry"/>

在这里插入图片描述
在这里插入图片描述

3.2 解压缩文件和修改配置

在这里插入图片描述
解压缩后的结构
bin:可执行程序
conf:配置文件
lib:相关的jar
在这里插入图片描述
进入conf修改配置
在这里插入图片描述
修改,添加圈圈里面的
在这里插入图片描述
修改后的文件内容

# 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
dubbo.application.name=simple-monitor
dubbo.application.owner=
#zookeeper的配置信息
zookeeper://192.168.134.129:2181?backup=192.168.134.131:2181,192.168.134.132:2181
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=8080
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

3.3 启动监控服务

启动服务的程序在bin目录下,双击启动
在这里插入图片描述

3.4 启动成功

在这里插入图片描述

3.5 访问服务

地址:http://localhost:8080
在这里插入图片描述

3.6 在idea启动程序就可以在这里看到相关信息

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值