美文网首页
微服务-springcloud-turbine

微服务-springcloud-turbine

作者: jianshuqiang | 来源:发表于2020-03-10 19:34 被阅读0次

tubine的作用:用于服务的多节点监控,汇总dashboard的监控数据,进行整体的监控
被监控的服务需要开启端点 即@EnableCircuitBreaker

加入依赖

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-turbine</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

配置文件

server.port=10012
spring.application.name=sys-tool-hystrix-turbine
#注意被监控的服务需要启动 @EnableCircuitBreaker
turbine.app-config=company-info-test,company-info-test2
turbine.aggregator.cluster-config=default
turbine.cluster-name-expression=new String("default")
eureka.client.serviceUrl.defaultZone= http://localhost:8761/eureka/
management.endpoints.web.exposure.include=*
#  health,info,env
management.endpoint.health.show-details=always

启用组件

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableTurbine

相关文章

网友评论

      本文标题:微服务-springcloud-turbine

      本文链接:https://www.haomeiwen.com/subject/csetlctx.html