spring cloud dashboard的简单应用

Spring Cloud断路器监控:Hystrix Dashboard实战 通过本文的示例演练,我们了解了如何使用Spring Cloud和Hystrix Dashboard搭建一个可视化的断路器监控系统。通过监控断路器的状态和指标,我们可以及时发现并解决系统中的故障和瓶颈,提高系统的可用性和稳定性。 阅读详情

一、简介   

Hystrix Dashboard是Hystrix熔断器的一个组件,它未用户提供了相对友好的图形化界面来监控接口访问数据。下面我们通过demo来学习。

二、通过demo学习

新建一个dashboard-service项目。

1、pom.xml依赖

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
        </dependency>

 

2、application.properties配置

server.port=9095
spring.application.name=dashboard-service
hystrix.dashboard.proxy-stream-allow-list=*

3、项目代码

package com.example.dashboardservice9095;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;

@EnableHystrixDashboard
@SpringBootApplication
public class DashboardService9095Application {
//    http://localhost:9095/hystrix
//    http://localhost:7070/actuator/hystrix.stream
    public static void main(String[] args) {
        SpringApplication.run(DashboardService9095Application.class, args);
    }

}

三、总结

   启动项目后,我们访问dashboard-service:http://localhost:9095/hystrix 打开Dashboard界面。

如果我们想监控A应用的接口熔断情况,我们需要在A应用中添加以下依赖:

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

并且需要我们在A应用的yml配置文件中新增以下配置:

management:
  endpoints:
    web:
      exposure:
        include: refresh,hystrix.stream #refresh打开actuator的配置文件刷新设置;hystrix.stream:打开hystrix状态信息获取

这样我们就可以监控A应用的请求情况了。假设A应用的服务地址是:http://localhost:7070/,我们可以访问:http://localhost:7070/actuator/hystrix.stream查看A应用中接口的熔断情况。或者我们可以通过hystrix-dashboard来监控:

简单讲解下dashboard的图形界面:
上面的“queryOrder”、“queryOrderTimeout”为监听熔断的接口;
下面灰色的圆圈代表是健康情况,如果是红色则代表不健康,形状越大流量越大
凸起来的灰色线,是请求的流量的变化情况
第一列 监控的是request请求
第一个绿色的数字,代表成功访问请求的数量,对应横向的绿色Success。98%是错误率。
第二个蓝色的数字,代表Short-Circuited
第三个青色的数字,代表错误请求的数量
第二列 针对的是response
第一个橙色的数字,代表超时访问的数量
第二个紫色的数字,代表拒绝访问的数量
第三个红色的数字,代表失败的服务数量
第三列 针对的是request/response 错误比例 或者成功比例
最重要的一个指标是参考 Circuit 代表熔断器的状态 close的关闭,open是打开

Spring-Dashboard-开源 Spring仪表板提供任何spring-framework Web应用程序的实时统计信息和监视视图。 借助Spring-dashboard,开发人员和测试人员可以监视应用程序内的流程,并收集有关应用程序使用情况的统计信息 立即下载

相关推荐

微服务springcloud之dashboard使用demo(仪表盘)

针对生产环境, Netflix还给我们准备了一个非常好用的运维工具, 那就是Hystrix Dashboard,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据. 但是只使用Hystrix Dashboard的话, 能看到单个应用内的服务信息,大神必备神器,导入即用,无需更改和配置!

Springboot项目的RunDashboard如何在IDEA中显示出来

第一步,点击如图所示位置的下来三角按钮,然后选择Edit Configurations,或者点击菜单栏Run》Edit Configurations 第二步,在运行配置窗口,选择一条springboot的运行配置,然后点击上方的复制按钮进行复制副本 第三步,复制完成之后,点击OK确定按钮,然后在屏幕右下角可以看到一个弹框提示 第四步,点击弹框右下角的向下的小箭头,展开弹框详情信息,然后点击S...

java_Waaangzy的博客 1928

论文选题难?7种AI加持的万能选题法(全专业通用+工具实测)

AI时代学术选题新范式:7大智能方法破解研究痛点 传统选题方法面临范围失控、资料难寻、创新不足三大痛点,本文提出AI赋能的7种选题方法论: 1.现象+群体法:自动抓取热点与人群特征 2.理论+场景法:经典理论与新兴场景匹配 3.技术+问题法:前沿技术与领域痛点结合 4.对比+变量法:时空维度与变量关系分析 5.热点+理论法:事件传播与理论深挖融合 6.微调+变量法:已有选题变量置换创新 7.AI全流程法:关键要素智能迭代生成 同时警示AI使用的伦理边界,需规避虚构文献、伪造数据等风险,并提供针对本科生、研究

Conan_0728的博客 1883

Spring Cloud——流监控Dashboard

讲解Spring Cloud中Hystrix的流监控Dashboard的搭建以及简单实用,整个流程非常清晰。

一心同学的博客 1838

FPGA远程更新实战:Multiboot双镜像配置与Flash分区策略

本文详细介绍了FPGA远程更新中Multiboot双镜像的配置与实现,重点对比了XDC约束和ICAPE2原语两种配置方案的优缺点及适用场景。提供了基于W25Q128 Flash的非对称分区策略、MCS文件生成与烧写方法,并深入探讨了远程更新的流程容错处理与可靠性优化建议,帮助开发者构建稳定可靠的FPGA远程更新系统。

ss78901的博客 839

麒麟操作系统安装达梦数据库ARM版

Linux安装达梦数据库ARM版

运维@小兵的博客 8770

SpringCloud之Dashboard服务监控

dashboard监控

qq_43654581的博客 643

使用pdfBox实现pdf转图片出现中文方块乱码 简单修改源码解决

参考文章 问题排查:使用pdfbox将pdf转image时STSong-Light字体中文乱码 pdfbox版本是2.0 日志中打印出类似这样的日志(例:Using fallback XXX for CID-keyed font STSong-Light),就说明系统没有安装STSong-Light字体,pdfbox使用XXX字体来替代了。如果出现方块,就说明没有这种字体,并且替代字体也没有,日志也有相应的其他提示。 正常操作就是安装缺失的 STSong-Light 字体,但是在网上搜到的都是 STSong

aji_csdn的博客 5266

springcloud dashboard控制面板上的各项指标详解(图文并茂)

<div id="content_views" class="markdown_views prism-atom-one-dark"> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-mark...

万事俱备,就差一个程序员了 637

Outlook邮件规则实战:从自动化分类到GTD工作流整合

在信息过载的数字化办公环境中,自动化处理技术成为提升效率的关键。其核心原理是基于“条件-动作”的触发器模型,通过预设逻辑让系统自动执行重复性任务。这种自动化机制的技术价值在于将用户从繁琐的机械操作中解放出来,实现信息流的智能管控。在邮件管理这一典型应用场景中,自动化规则能精准处理项目邮件聚合、优先级分流等复杂需求。本文聚焦于微软Outlook的规则引擎,深入解析如何利用**规则引擎**和**触发器模型**构建高效的邮件处理系统,并进一步将其融入GTD(Getting Things Done)个人生产力框架,

weixin_31083901的博客 313

W5500 MACRAW模式实战:在ESP32上抓取并解析原始以太网数据包

本文详细介绍了如何在ESP32开发板上使用W5500芯片的MACRAW模式捕获和解析原始以太网数据包。通过硬件连接指南、代码实现示例和协议解析技巧,帮助开发者深入理解网络通信底层机制,实现网络嗅探和自定义协议开发等高级应用。

weixin_42520573的博客 418

springcloud2.0 -- dashboard

pom依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> ...

你们不要再学了,我跟不上了 881

基于RTL8370N的8口千兆无管理交换机硬件设计

无管理交换机是局域网边缘接入的核心基础设备,其本质是通过硬件状态机实现MAC地址学习、线速转发与自动协商,无需软件配置即可完成即插即用组网。原理上依赖高度集成的PHY+交换矩阵单芯片(如RTL8370N),结合确定性硬件逻辑替代MCU固件,保障低延迟、高可靠与零运维。技术价值体现在成本压缩、体积精简与部署极简化,广泛应用于家庭网络扩展、工业现场设备联网及嵌入式系统桥接等场景。本文详解一款基于RTL8370N的紧凑型8端口千兆无管理交换机,覆盖芯片选型依据、PHY接口设计、电源与散热优化等关键工程实践。

weixin_42327217的博客 402

Spring Cloud Hystrix【应用篇】 Hystrix Dashboard

参考资料: Hystrix GitHub 官方文档 Hystrix Wiki 文档 spring Cloud 文档 Hystrix Dashboard Hystrix Dashboard 界面 在 Hystrix Dashboard 界面中,我们能够知道有三种输入方式获取 Hystrix 监控信息 默认集群监控 Cluster via Turbine (default cluster):...

保持敏感!保持学习! 649

Keras神经网络可视化模块keras.utils.visualize_util的安装配置方法

本文介绍了如何安装和配置keras.utils.visualize_util模块,并提供了一个简单的示例演示如何使用该模块来可视化神经网络的结构。在上述代码中,我们首先定义了一个简单的神经网络模型,该模型具有一个输入层、一个隐藏层和一个输出层,其中隐藏层具有512个神经元,输出层具有10个神经元。运行上述代码后,我们将在当前工作目录下找到一个名为model.png的文件,它显示了神经网络的结构图。这种方式有效地展示了整个过程,让我们能够更好地理解神经网络的结构,方便对其进行改进和调试。

. 892

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

spring cloud alibaba 应用无法注册到sentinel dashboard

spring cloud alibaba 应用无法注册到sentinel dashboard

寂夜了无痕的博客 5292

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

spring cloud 使用Hystrix-dashboard 监控Feign的单个应用

http://wjhsh.net/yhood-p-11573980.html 上一篇,使用了Feign的熔断器Hystrix,去对Consumer进行了改造,使其拥有了对服务异常的处理能力。 接下来要做对服务的访问情况进行监控 Hystrix-dashboard 熔断监控,在实际集群中同服务的节点有许多个,这里仅作单个服务节点的监控,集群中的监控会在下一篇有讲 对消费者Consumer进行改造 pom.xml 新增3个依赖 <dependency> .

yygr的博客 309

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

10.Spring-Cloud-Hystrix之熔断监控Hystrix Dashboard单个应用

SpringCloud完美的整合Hystrix-dashboard,Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。可以实时反馈信息帮助我们快速发现系统中,但是只使用Hystrix Dashboard的话, 你只能看到单个应用内的服务信息。 ...

盲目的拾荒者的博客 2528

【转载】10.Spring-Cloud-Hystrix之熔断监控Hystrix Dashboard单个应用

SpringCloud完美的整合Hystrix-dashboard,Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。可以实时反馈信息帮助我们快速发现系统中...

qq_27468351的博客 221

Spring Cloud 应用篇 之 Hystrix Dashboard(断路器监控) 的基本搭建

在以往的文章里,已经讲解了 断路器 Hystrix 的基本使用,现在将介绍断路器的监控 Hystrix Dashboard 的基本搭建。 (一)简介 Hystrix Dashboard 是 Hystrix 的仪表盘组件,提供了数据监控,可以实时监控 Hystrix 的各个指标,然后通过图形化界面展示出来。 (二)搭建环境 1. 创建一个module(spring-cloud-hystrix...

wuwangchuxin 198

解决无法引入spring-cloud-starter-netflix-hystrix-dashboard

加入依赖: <dependency> 这两个依赖配合才引入了dashboard <groupId>com.netflix.hystrix</groupId> <artifactId>hystrix-javanica</artifactId> <version&g...

u_my_heart的博客 1万+

spring cloud hystrix dashboard 单机监控

springcloudhystrixdashboard单机监控 *************************** 单体监控 *************************** 使用示例 ************************ 监控的消费端 @FeignClient(name = "hello-...

weixin_43931625的博客 257

spring cloud hystrix dashboard 集群监控

springcloudhystrixdashboard集群监控 ********************************** 集群同步监控:将监控信息直接输出到dashboard 集群异步监控:将监控信息发送到消息中间件中,消息中间件中再将监控信息输出到dashboard ...

weixin_43931625的博客 404

Spring Cloud学习笔记(六)-使用Hystrix Dashboard监控熔断器的状态

说明:本文仅作为本人学习&amp;lt;&amp;lt;深入理解Spring Cloud与微服务构建&amp;gt;&amp;gt;一书的学习笔记,所有代码案例及文字描述均参考该书,不足之处,请留言指正,不胜感激. 一.Hystrix Dashboard是干什么的   在微服务架构中,为了保证服务实例的可用性,防止服务实例出现故障导致线程阻塞,而出现了熔断器模型.熔断器的状况反映了一个程序的可用性和健壮性,它是一个重要指标...

fly_zhaohy的博客 3279
上一篇: apache-jmeter压测工具的安装和使用
下一篇: centos 中redis的使用
红姬茄子
博客等级 码龄16年 8238粉丝 55原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值