监控个中心增加服务调用顺序监控功能
This commit is contained in:
@@ -8,3 +8,4 @@ echo "127.0.0.1 www.ucenter.com" >> /etc/hosts
|
||||
echo "127.0.0.1 www.gateway.com" >> /etc/hosts
|
||||
echo "127.0.0.1 www.mall.com" >> /etc/hosts
|
||||
echo "127.0.0.1 www.pay.com" >> /etc/hosts
|
||||
echo "127.0.0.1 www.monitorcenter.com" >> /etc/hosts
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# 微服务系统监控中心
|
||||
#### 集群服务熔断情况的监控
|
||||
界面访问地址
|
||||
#### 集群服务调用情况的监控
|
||||
界面访问地址`/`
|
||||
@@ -23,6 +23,11 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--web-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!--配置加载-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
@@ -46,6 +51,16 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-netflix-turbine</artifactId>
|
||||
</dependency>
|
||||
<!--服务调展示界面-->
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-server</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-ui</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!--测试-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
+4
@@ -3,12 +3,16 @@ package com.micro.fast.monitor.center;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.cloud.netflix.turbine.EnableTurbine;
|
||||
import zipkin.server.EnableZipkinServer;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
//集群熔断降级情况的聚合展示
|
||||
@EnableTurbine
|
||||
//集群间服务调用情况的聚合展示
|
||||
@EnableZipkinServer
|
||||
public class MsMonitorCenterApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
+11
-26
@@ -46,12 +46,6 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-feign</artifactId>
|
||||
</dependency>
|
||||
<!--测试-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--熔断,断的是这个服务调用其他服务时失败的时候断-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
@@ -71,26 +65,17 @@
|
||||
<groupId>org.springframework.retry</groupId>
|
||||
<artifactId>spring-retry</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--检测服务调用-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.springframework.cloud</groupId>-->
|
||||
<!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!--服务调展示界面-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>io.zipkin.java</groupId>-->
|
||||
<!--<artifactId>zipkin-server</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>io.zipkin.java</groupId>-->
|
||||
<!--<artifactId>zipkin-autoconfigure-ui</artifactId>-->
|
||||
<!--<scope>runtime</scope>-->
|
||||
<!--</dependency>-->
|
||||
<!--检测生成服务调用数据-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zipkin</artifactId>
|
||||
</dependency>
|
||||
<!--测试-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 从配置中心加载文件
|
||||
spring:
|
||||
session:
|
||||
store-type: none
|
||||
store-type: none
|
||||
cloud:
|
||||
config:
|
||||
profile: dev
|
||||
@@ -12,7 +12,7 @@ spring:
|
||||
enabled: true
|
||||
username: config
|
||||
password: server
|
||||
# 允许记录消息的所有发送和接收事件
|
||||
# 允许记录消息的所有发送和接收事件
|
||||
bus:
|
||||
trace:
|
||||
enabled: true
|
||||
@@ -20,6 +20,9 @@ spring:
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
port: 5672
|
||||
# 向服务监控调用中心暴露端口
|
||||
zipkin:
|
||||
base-url: http://www.monitorcenter.com:10018
|
||||
eureka:
|
||||
client:
|
||||
serviceUrl:
|
||||
@@ -32,3 +35,4 @@ logging:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user