hystrix.stream dashboard

简介: hystrix.stream dashboard

9001 POM.XML

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <!-- 引入父工程的spring boot依赖 -->
    <parent>
        <groupId>com.cloud</groupId>
        <artifactId>spring-cloud</artifactId>
        <version>1.0</version>
    </parent>
    <groupId>com.cloud</groupId>
    <artifactId>cloud-provider9001-hystrix</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>cloud-provider9001-hystrix</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Finchley.SR2</spring-cloud.version>
    </properties>
    <dependencies>
        <!--web模块-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!-- Eureka客户端模块 -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <!-- 健康检查模块 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <!--  hystrix -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
        </dependency>
        <!-- tomcat支持 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <!--<scope>provided</scope> 去掉,不然会报错-->
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</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>

9001 application.yml

server:
  port: 9001
spring:
  application:
    name: cloud-provider
eureka:
  client:
    serviceUrl:
#      defaultZone: http://user:123456@localhost:8080/eureka/      #服务注册中信地址,含有BASIC认证的用户名和密码
      defaultZone: http://user:123456@eureka8001.com:8001/eureka/,http://user:123456@eureka8002.com:8002/eureka/,http://user:123456@eureka8003.com:8003/eureka/  #服务注册中心地址,http://账号:密码@主机名称:端口/Eureka/
  instance:
    prefer-ip-address: true #将IP注册到服务注册中心
    instance-id: ironfo-9001-hystrix
#放开所有节点
management:
  endpoints:
    web:
      exposure:
        include: '*'

9090  dashboard

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.cloud</groupId>
    <artifactId>cloud-hystrix-dashboard</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>cloud-hystrix-dashboard</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>Hoxton.SR3</spring-cloud.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</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>

 

 


 

如果访问 hystrix.stream 时 报  (type=Bad Request, status=400)

 

跟版本有关,访问地址应为: http://localhost:9001/actuator/hystrix.stream

 

 

 

 

目录
相关文章
|
监控 Java Spring
Hystrix Dashboard使用及面板参数详述
Hystrix Dashboard使用及面板参数详述
397 0
Hystrix Dashboard使用及面板参数详述
|
7月前
|
监控 Java API
Spring cloud Hystrix 、Dashboard、API(zuul)相关报错
Spring cloud Hystrix 、Dashboard、API(zuul)相关报错
86 2
|
Java Maven
从零学SpringCloud系列(五):SpringBoot2.2.5集成Hystrix Dashboard及遇到的坑
从零学SpringCloud系列(五):SpringBoot2.2.5集成Hystrix Dashboard及遇到的坑
217 0
从零学SpringCloud系列(五):SpringBoot2.2.5集成Hystrix Dashboard及遇到的坑
|
监控 Java 微服务
16SpringCloud - 断路器项目示例(Hystrix Dashboard)
16SpringCloud - 断路器项目示例(Hystrix Dashboard)
60 0
|
监控 数据可视化 Java
手把手教你搭建SpringCloud项目(十二 )集成Hystrix之图形化Dashboard实时监控
手把手教你搭建SpringCloud项目(十二 )集成Hystrix之图形化Dashboard实时监控
166 1
|
监控 Java 微服务
SpringCloud极简入门-服务监控-Hystrix Dashboard & Turbine
Hystrix是一种服务熔断机制,其熔断降级策略有效的防止了微服务的雪崩问题,Hystrix的出现提高了微服务的可用性和健壮性,而Hystrix Dashboard则是用来监控Hystrix的熔断器状况的重要组件(又叫仪表盘),它提供了数据监控,健康状态,熔断状态,并发数量等等信息,和友好的图形化展示界面,能让使用者很好的监控和分析熔断器的状态。
386 0
|
监控 数据可视化 Java
Spring Cloud【Finchley】-12使用Hystrix Dashboard实现Hystrix数据的可视化监控
Spring Cloud【Finchley】-12使用Hystrix Dashboard实现Hystrix数据的可视化监控
156 0
|
监控 数据可视化 Java
SpringCloud学习(十五):Hystrix图形化Dashboard搭建与实战
SpringCloud学习(十五):Hystrix图形化Dashboard搭建与实战
201 0
SpringCloud学习(十五):Hystrix图形化Dashboard搭建与实战
|
运维 监控 数据可视化
Hystrix Dashboard 让你更了解系统的运行情况
断路器的打开和关闭状态的变化是由系统收集一些重要参数,当达到条件时才触发的。而这些请求情况的指标信息都是 HystrixCommand和 HystrixObservableCommand实例在执行过程中记录的重要信息,为了帮助我们系统运维或性能优化做出判断, HystrixDashboard实现Hystrix指标数据的可视化。 接口实现使用了 @HystrixCommand注解后,这个接口的调用情况会被Hystrix记录下来,并用来给断路器和 HystrixDashboard使用。 Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboa
|
监控 数据可视化 Java
SpringCloud之服务监控Hystrix Dashboard
SpringCloud之服务监控Hystrix Dashboard
SpringCloud之服务监控Hystrix Dashboard