spring cloud 集群健康监控--turbine-dashboard仪表盘
这里仍然以Windows和jdk为运行环境,按照下面的步骤打包-运行-访问就能看到效果。
运维健康监控--hystrix-dashboard仪表盘
java -jar F:\jars-dashboard\register-0.0.1-SNAPSHOT.jar
java -jar F:\jars-dashboard\dashboard-0.0.1-SNAPSHOT.jar
dashboard仪表盘访问地址:http://localhost:4444/hystrix
单节点监控--启动服务:
java -jar F:\jars-dashboard\client-feign-0.0.1-SNAPSHOT.jar
java -jar F:\jars-dashboard\client-ribbon-0.0.1-SNAPSHOT.jar
单节点监控--在仪表盘的输入框内输入如下地址,并点击Monitor Stream按钮就会出现监控界面:
http://localhost:8080/actuator/hystrix.stream
http://localhost:8090/actuator/hystrix.stream
调用如下接口(与上述地址分别对应)就会在监控页面出现监控数据:
http://localhost:8080/ribbon/consumer/200
http://localhost:8090/feign/consumer/200
集群监控--启动服务:
java -jar F:\jars-dashboard\turbine-0.0.1-SNAPSHOT.jar
java -jar F:\jars-dashboard\client-feign-0.0.1-SNAPSHOT.jar --server.port=8091
java -jar F:\jars-dashboard\client-feign-0.0.1-SNAPSHOT.jar --server.port=8092
java -jar F:\jars-dashboard\client-ribbon-0.0.1-SNAPSHOT.jar --server.port=8081
java -jar F:\jars-dashboard\client-ribbon-0.0.1-SNAPSHOT.jar --server.port=8082
在仪表盘的输入框内输入如下地址,并点击Monitor Stream按钮就会出现监控界面:
http://localhost:5555/turbine.stream
调用如下接口就会在监控页面出现监控数据:
http://localhost:8081/ribbon/consumer/200或http://localhost:8082/ribbon/consumer/200
http://localhost:8091/feign/consumer/200或http://localhost:8092/feign/consumer/200
基于消息驱动的的健康监控:略
源码下载地址:https://github.com/zhzhair/spring-cloud-examples.git