spring cloud:hystrix-dashboard-turbine
hystrix-dashboard-turbine-server
1. File-->new spring starter project
2.add dependency
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>2.1.5.RELEASE</version>
- <relativePath/> <!-- lookup parent from repository -->
- </parent>
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
- </dependency>
3.Edit application.yml
- server:
- port:
- spring:
- application:
- name: hystrix-dashboard-turbine-server
- turbine:
- app-config: hystrix-dashboard-client-node1,hystrix-dashboard-client-node2
- aggregator:
- cluster-config: default
- cluster-name-expression: new String("default")
- eureka:
- client:
- service-url:
- defaultZone: http://localhost:8761/eureka/
4.program
- package com.smile;
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
- import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
- import org.springframework.cloud.netflix.turbine.EnableTurbine;
- @SpringBootApplication
- @EnableHystrixDashboard
- @EnableTurbine
- @EnableEurekaClient
- public class HystrixDashboardTurbineServerApplication {
- public static void main(String[] args) {
- SpringApplication.run(HystrixDashboardTurbineServerApplication.class, args);
- }
- }
5.Run
http://localhost:9000/turbine.stream
由于是默认cluster,所以输入 http://localhost:9000/turbine.stream,click Monitor Stream
按照 hystrix-dashboard-client 分别创建 hystrix-dashboard-client-node1和 hystrix-dashboard-client-node2 修改如下
- server:
port: 9002
spring:- application:
- name: hystrix-dashboard-client-node1
- server:
port: 9003
spring:- application:
- name: hystrix-dashboard-client-node2
- package com.smile.remote;
- import org.springframework.cloud.openfeign.FeignClient;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- @FeignClient(name = "producer",fallback = HelloServiceHystrix.class)
- public interface HelloService {
- @RequestMapping("/getHello")
- public String getHello1(@RequestParam String name);
- }
- package com.smile.remote;
- import org.springframework.cloud.openfeign.FeignClient;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- @FeignClient(name = "producer",fallback = HelloServiceHystrix.class)
- public interface HelloService {
- @RequestMapping("/getHello")
- public String getHello2(@RequestParam String name);
- }
将其它class中调用到getHello()的地方对应修改一下就可以了, 有时会出现监控不到的情况,需要请求以下该服务的actuator接口就可以了 such as: http://localhost:9003/actuator
此处只有一个 Thread Pools ,because just one producer
spring cloud:hystrix-dashboard-turbine的更多相关文章
- Spring Cloud Hystrix Dashboard熔断器-Turbine集群监控(六)
序言 上一篇说啦hystrix的使用方法与配置还有工作流程及为何存在,我去,上一篇这么屌,去看看吧,没这么屌的话,我贴的有官方文档,好好仔细看看 hystrix除啦基本的熔断器功能之外,还可以对接口的 ...
- Spring Cloud Hystrix Dashboard的使用 5.1.3
Hystrix除了可以对不可用的服务进行断路隔离外,还能够对服务进行实时监控.Hystrix可以实时.累加地记录所有关于HystrixCommand的执行信息,包括每秒执行多少.请求成功多少.失败 ...
- spring cloud hystrix dashboard 没有/actuator/hystrix.stream路径解决
首先我用的是spring boot Greenwich.SR2 在测试hystrix-dashboard监控服务时,发现访问localhost:9001/actuator/hystrix.stream ...
- Spring Cloud 2-Hystrix DashBoard仪表盘(五)
Spring Cloud Hystrix DashBoard 1.监控系统配置 pom.xml application.yml Application.java 2.被监控服务配置 pom.xml ...
- 微服务架构之spring cloud hystrix&hystrix dashboard
在前面介绍spring cloud feign中我们已经使用过hystrix,只是没有介绍,spring cloud hystrix在spring cloud中起到保护微服务的作用,不会让发生的异常无 ...
- Spring Cloud Hystrix理解与实践(一):搭建简单监控集群
前言 在分布式架构中,所谓的断路器模式是指当某个服务发生故障之后,通过断路器的故障监控,向调用方返回一个错误响应,这样就不会使得线程因调用故障服务被长时间占用不释放,避免故障的继续蔓延.Spring ...
- 分布式系统的延时和故障容错之Spring Cloud Hystrix
本示例主要介绍 Spring Cloud 系列中的 Eureka,如何使用Hystrix熔断器容错保护我们的应用程序. 在微服务架构中,系统被拆分成很多个服务单元,各个服务单元的应用通过 HTTP 相 ...
- Spring Cloud 微服务笔记(六)Spring Cloud Hystrix
Spring Cloud Hystrix Hystrix是一个延迟和容错库,旨在隔离远程系统.服务和第三方库,阻止链接故障,在复杂的分布式系统中实现恢复能力. 一.快速入门 1)依赖: <dep ...
- 试水Spring Cloud Hystrix
Spring Cloud Hystrix是一个容错库,它实现了断路器模式,使得当服务发生异常时,会自动切断连接,并将请求引导至预设的回调方法. 服务端 在Spring Tool Suite的文件菜单中 ...
- 7、Spring Cloud Hystrix
1.Spring Cloud Hystrix简介 (1).分布式问题 复杂分布式体系结构中的应用程序有数十个依赖关系,每个依赖关系在某些时候将不可避免地失败. 多个微服务之间调用的时候,假设微服务A调 ...
随机推荐
- OLT设置vlan透传及ONU端口划vlan
CZ-PX-ShangShi-FTTH-OLT-A#show runn System current configuration:!Software Version ISCOM5800E-SMCB_1 ...
- PhpStorm配置Xdebug调试
安装xdebug 去官网下载对应版本的xdebug扩展 XDEBUG EXTENSION FOR PHP | DOWNLOADS 如何选择正确版本 输出phpinfo()函数的内容 查看输出页面的网页 ...
- day 02 while 循环 格式化输出 运算符 and or not - 编码的初识
while 循环 while 条件: 循环体 循环如何终止? 改变条件. flag = Truewhile flag: print('狼的诱惑') print('我们不一样') ...
- Codeforces 1220B. Multiplication Table
传送门 冷静分析容易发现,我们只要能确定一个数的值,所有值也就可以确定了 确定一个数的值很容易,$a_ia_j=M_{i,j},a_ia_k=M_{i,k},a_ja_k=M_{j,k}$ 然后就可以 ...
- [.net core]8.中间件的概念
假设我们的中间件是这样的(可以自由排列, 扩展自定义中间件) logging负责记录请求/响应 staticFiles 负责响应 静态文件 MVC 负责响应 视图 当.net core web app ...
- 094、Swarm 中最重要的概念(Swarm01)
参考https://www.cnblogs.com/CloudMan6/p/7845365.html 从主机层面来看,Docker Swarm 管理的是 Docker Host 集群.所以先来讨论 ...
- iOS 支付 [支付宝、银联、微信]
这是开头语 前不久做了一个项目,涉及到支付宝和银联支付,支付宝和银联都是业界的老大哥,文档.SDK都是很屌,屌的找不到,屌的看不懂,屌到没朋友(吐槽而已),本文将涉及到的最新可用SDK.文档,以及本人 ...
- Linux常用命令及Shell的简单介绍
一.linux命令 1.查看指令的参数搭配: man 指令名称 2.基础指令 ls 列出当前目录下的所有文档的名称(文档指的是文件和文件夹) 常用参数搭配: ls -l 列出文档详细信息 l ...
- Awkward Response AtCoder - 2656 ( 二分+交互题)
Problem Statement This is an interactive task. Snuke has a favorite positive integer, N. You can ask ...
- 解决在linux下安装centos自带的mysql后,出现navicat远程连接失败的问题
最近在学习关于数据库相关的东西,所以下午尝试在linux下自己搭建了myql,我的mysql是直接安装centos系统自带的,安装过程不再赘述 安装完成后,从linux后台登录也显示成功,但是就是从n ...