我在使用涡轮仪表板时遇到了一些问题。因为我能够获得给定群集的涡轮流,但是无法在仪表板上看到任何内容,因为它正在加载,如下面的屏幕截图所示。如果缺少任何配置,请提供帮助。
以下是我的配置:
config.properties
turbine.aggregator.clusterConfig=SpringHystrixDemo2
turbine.instanceUrlSuffix=:9080/hystrix.stream
turbine.EurekaInstanceDiscovery.hystrix2.instances=localhost
InstanceDiscovery.impl=com.netflix.turbine.discovery.EurekaInstanceDiscovery.class
turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false
Application.yml
server:
port: 8080
turbine:
aggregator:
clusterConfig: SPRINGHYSTRIXDEMO2
clusterNameExpression: new String("default")
appConfig: SpringHystrixDemo2
InstanceMonitor:
eventStream:
skipLineLogic:
enabled: false
bootstrap.yml
spring:
application:
name: SpringTurbine
cloud:
config:
discovery:
enabled: true
eureka:
instance:
nonSecurePort: ${server.port:8080}
client:
serviceUrl:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
Application.java
@SpringBootApplication
@EnableHystrix
@EnableEurekaClient
@EnableHystrixDashboard
@EnableTurbine
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
对于集群SpringHystrixDemo2,我已在其他端口上运行的不同应用程序中配置它:
application.yml -
server:
port: 9080
hystrix:
command:
RemoteMessageClientCommand:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
RemoteMessageAnnotationClient:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
bootstrap.yml
spring:
application:
name: SpringHystrixDemo2
cloud:
config:
enabled: true
discovery:
enabled: true
serviceId: SPRINGCONFIGSERVER
eureka:
instance:
nonSecurePort: ${server.port:9080}
client:
serviceUrl:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
Application.java - 这是来自hystrix仪表板服务。
@SpringBootApplication
@EnableHystrix
@EnableHystrixDashboard
@EnableEurekaClient
@EnableDiscoveryClient
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
我在8761端口上配置了eureka服务器。这是所有其他eureka client.as
这就是我无法看到任何涡轮仪表板的方法。因为它刚刚加载。 turbine stream view
答案 0 :(得分:0)
我想到的第一件事是你可以声明一个这样的管理端点:
management:
port: 9081
contextPath: /management
然后涡轮流可以通过 {yourHost}:9081 / management / turbine.stream 访问,而hystrix仪表板将在 {yourhost}:9080 / hystrix
答案 1 :(得分:0)
根据我的阅读和已知,从您的配置
turbine.aggregator.clusterConfig=SpringHystrixDemo2
turbine.instanceUrlSuffix=:9080/hystrix.stream
turbine.EurekaInstanceDiscovery.hystrix2.instances=localhost InstanceDiscovery.impl=com.netflix.turbine.discovery.EurekaInstanceDiscovery.class
turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false
以下可能是问题。
你缺少一些配置,也许你还有一些额外的配置。
以下是我的财产。
#turbine.clusterNameExpression=new String('default')
#turbine.clusterNameExpression="'default'"
turbine.instanceInsertPort=false
turbine.appConfig=service1
turbine.aggregator.clusterConfig=SERVICE1
turbine.instanceUrlSuffix.SERVICE1=:51512/hystrix.stream
#turbine.ConfigPropertyBasedDiscovery.USER.instances=service1-host1.abc.com,service1-host2.abc.com
InstanceDiscovery.impl=com.netflix.turbine.discovery.EurekaInstanceDiscovery.class
#for high latencies
#turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false
并尝试涡轮机流
http://host:port/turbine.stream?cluster=SERVICE1