提交 ee39dc58 authored 作者: 陈世营's avatar 陈世营

[修改]sentinel 版本升级为1.7.2 并将spring-cloud-timeloit修改为0.0.1-SNAPSHOT

上级 a6574127
......@@ -14,7 +14,7 @@
<groupId>com.timeloit.cloud</groupId>
<artifactId>spring-cloud-timeloit</artifactId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Timeloit</name>
......@@ -98,7 +98,7 @@
<dependency>
<groupId>com.timeloit.cloud</groupId>
<artifactId>spring-cloud-timeloit-dependencies</artifactId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-starter-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-starter-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -12,7 +12,7 @@
<groupId>com.timeloit.cloud</groupId>
<artifactId>spring-cloud-timeloit-dependencies</artifactId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Timeloit</name>
......@@ -21,7 +21,7 @@
<properties>
<revision>2.0.2.RELEASE</revision>
<sentinel.version>1.7.1</sentinel.version>
<sentinel.version>1.7.2</sentinel.version>
<seata.version>1.1.0</seata.version>
<nacos.client.version>1.2.1</nacos.client.version>
<nacos.config.version>0.8.0</nacos.config.version>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-timeloit</artifactId>
<groupId>com.timeloit.cloud</groupId>
<version>2.0.2.RELEASE</version>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -61,7 +61,7 @@ public class SentinelEndpoint {
result.put("metricsFileSize", SentinelConfig.singleMetricFileSize());
result.put("metricsFileCharset", SentinelConfig.charset());
result.put("totalMetricsFileCount", SentinelConfig.totalMetricFileCount());
result.put("consoleServer", TransportConfig.getConsoleServer());
result.put("consoleServer", TransportConfig.getConsoleServerList());
result.put("clientIp", TransportConfig.getHeartbeatClientIp());
result.put("heartbeatIntervalMs", TransportConfig.getHeartbeatIntervalMs());
result.put("clientPort", TransportConfig.getPort());
......
......@@ -17,8 +17,10 @@
package com.timeloit.cloud.sentinel.endpoint;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.csp.sentinel.util.function.Tuple2;
import com.timeloit.cloud.sentinel.SentinelProperties;
import com.alibaba.csp.sentinel.datasource.AbstractDataSource;
import com.alibaba.csp.sentinel.heartbeat.HeartbeatSenderProvider;
......@@ -30,6 +32,7 @@ import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.actuate.health.Status;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
/**
......@@ -82,8 +85,9 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator {
// Check health of Dashboard
boolean dashboardUp = true;
String consoleServer = TransportConfig.getConsoleServer();
if (StringUtils.isEmpty(consoleServer)) {
List<Tuple2<String, Integer>> consoleServerList = TransportConfig
.getConsoleServerList();
if (CollectionUtils.isEmpty(consoleServerList)) {
// If Dashboard isn't configured, it's OK and mark the status of Dashboard
// with UNKNOWN.
detailMap.put("dashboard",
......@@ -101,8 +105,10 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator {
else {
// If failed to send heartbeat message, means that the Dashboard is DOWN
dashboardUp = false;
detailMap.put("dashboard", new Status(Status.DOWN.getCode(),
consoleServer + " can't be connected"));
detailMap.put("dashboard",
new Status(Status.DOWN.getCode(), String.format(
"the dashboard servers [%s] one of them can't be connected",
consoleServerList)));
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论