Spring Cloud (one) hystrix-monitoring aggregation monitoring

Source: Internet
Author: User

On a hystrix dashboard to monitor the circuit Breaker hystrix command, when we have a lot of services, we need to aggregate all the services Hystrix dashboard data, which requires hystrix turbine.

Hystrix Turbine

Looking at the individual Hystrix dashboard data does not have much value, want to see this system Hystrix dashboard data need to use Hystrix Turbine. Hystrix Turbine integrates each service Hystrixdashboard data. The use of the Hystrix turbine is simple, simply by introducing a response dependency and adding annotations and configurations.

First approach: Collect aggregations over HTTP

Create a Spring boot project named David-turbine

Pom.xml

<?XML version= "1.0" encoding= "UTF-8"?><Projectxmlns= "http://maven.apache.org/POM/4.0.0"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">    <modelversion>4.0.0</modelversion>    <groupId>Com.david</groupId>    <Artifactid>Turbine</Artifactid>    <version>0.0.1-snapshot</version>    <Packaging>Jar</Packaging>    <name>Turbine</name>    <Description>Demo Project for Spring Boot</Description>    <Parent>        <groupId>Org.springframework.boot</groupId>        <Artifactid>Spring-boot-starter-parent</Artifactid>        <version>1.5.9.RELEASE</version>        <RelativePath/> <!--Lookup parent from repository -    </Parent>    <Properties>        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>        <java.version>1.8</java.version>    </Properties>    <Dependencies>        <Dependency>            <groupId>Org.springframework.boot</groupId>            <Artifactid>Spring-boot-starter</Artifactid>        </Dependency>        <Dependency>            <groupId>Org.springframework.cloud</groupId>            <Artifactid>Spring-cloud-starter-turbine</Artifactid>        </Dependency>        <Dependency>            <groupId>Org.springframework.boot</groupId>            <Artifactid>Spring-boot-starter-actuator</Artifactid>        </Dependency>    </Dependencies>    <dependencymanagement>        <Dependencies>            <Dependency>                <groupId>Org.springframework.cloud</groupId>                <Artifactid>Spring-cloud-dependencies</Artifactid>                <version>Edgware.sr2</version>                <type>Pom</type>                <Scope>Import</Scope>            </Dependency>        </Dependencies>    </dependencymanagement>    <Build>        <Plugins>            <plugin>                <groupId>Org.springframework.boot</groupId>                <Artifactid>Spring-boot-maven-plugin</Artifactid>            </plugin>        </Plugins>    </Build></Project>

Use @enableturbine to open turbine in the startup class

@EnableTurbine @springbootapplication  Public class turbineapplication {    publicstaticvoid  main (string[] args) {        Springapplication.run (turbineapplication. class , args);}    }

Application.yml

Spring:  application:    name:david-turbineserver:  8769Security:  Basic:     falseturbine:  aggregator:    clusterdefault  #指定聚合哪些集群, multiple use, split Defaults to the default  app-config:david-eureka-client,david-feign,david-RIBBON #配置Eureka中的serviceId列表, Indicates which services are monitored  clusternew String ("Default") Eureka:  client:    Service-  URL:      defaultzone:http://localhost:8761/eureka/

Start the project in turn:

In the browser input Http://localhost:8769/turbine.stream

Open: Http://localhost:8762/hystrix, input monitor stream http://localhost:8769/turbine.stream OK

Spring Cloud (one) hystrix-monitoring aggregation monitoring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.