监控个中心增加服务调用顺序监控功能

This commit is contained in:
winLsy
2018-01-27 17:51:01 +08:00
parent 68a6994c3a
commit 7be8e1deb7
6 changed files with 42 additions and 28 deletions
+1
View File
@@ -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
+5
View File
@@ -0,0 +1,5 @@
# 微服务系统监控中心
#### 集群服务熔断情况的监控
界面访问地址
#### 集群服务调用情况的监控
界面访问地址`/`
+15
View File
@@ -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>
@@ -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
View File
@@ -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>
+6 -2
View File
@@ -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: