Dubbo之监控中心(Monitor)安装-yellowcong

本文介绍如何部署和配置Dubbo监控中心,包括修改配置文件、开启端口规则、启动服务等步骤,帮助用户有效监控Dubbo服务调用情况。

Dubbo监控中这里写代码片心,是用来查看服务的服务的调用情况等统计,为服务的运维采集数据。Monitor不是必须的,监控中心的失败,对于我们dubbo的正常服务是没有影响的

原版monitor 控制台

dubbo-monitor-simple-2.5.3-assembly.tar.gz

#码云地址
https://gitee.com/yellowcong/dubbo/tree/master/dubbo-monitor

#七牛云直接下载地址
http://yellowcong.qiniudn.com/dubbo-monitor-simple-2.5.3-assembly.tar.gz

解压

解压后目录结构如下图,我们主要修改conf目录下的dubbo.properties

这里写图片描述

dubbo.properties配置

1、需要修改zookeeper端口
2、修改jetty端口
3、monitor服务端口号, monitor本身就是一个dubbo服务

##
# 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=multicast://224.5.6.7:1234
#dubbo的zookeeper地址 需要修改 ,我这个是伪集群,所以都是一台机器
dubbo.registry.address=zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183
#dubbo.registry.address=redis://127.0.0.1:6379
#dubbo.registry.address=dubbo://127.0.0.1:9090
#这个monitor服务启动端口号
dubbo.protocol.port=7070
#web访问端口
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

开启端口

#修改配置文件, 这种改配置文件的方式相比命令的方式简单些
vim /etc/sysconfig/iptables

#添加两条规则
-A INPUT -p tcp -m tcp --dport 8090 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 7070 -m state --state NEW,ESTABLISHED -j ACCEPT


#重启防火墙生效
service iptables restart 

#查看添加上规则了没有
iptables -L -n 

这里写图片描述

注册服务

到 bin目录,启动服务

#启动服务
./start.sh

这里写图片描述

web打开

在浏览器中输入 主机ip:8090,就可以访问到监控中心了
这里写图片描述

dubbo-monitor

这个是人家基于原始版本的monitor更改而来的,效果杠杠滴,但是这个是支持的Dubbox的,这点需要注意

https://gitee.com/handu/dubbo-monitor.git
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

狂飙的yellowcong

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值