分離依存サービス泳動に加えて、Hystrixも(Hystrixダッシュボード)を監視するオンタイムコールを提供し、HystrixはHystrixによってすべてのレコード実行情報に続ける要求を開始し、統計レポートやグラフの形でユーザに提示される、それぞれ含みます何秒要求された多くの成功を実行するために、どのように多くの障害など。Netflixの上.SpringCloudを監視するために上記の指標を達成するためにもhystrixダッシュボードを統合し、hystrix・メトリック・イベント・ストリーム・プロジェクトを通じて、視覚的インターフェースにコンテンツを監視しています。
コンフィギュレーション
その依存関係
<dependencies>
<!-- hystrix dashboard 图形化监控依赖 -->
<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-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
マスターブートクラスプラス@EnableHystrixDashboardオープンダッシュボードモニター
その依存関係
各監視対象サービスは、オープン@EnableCircuitBreaker開始ヒューズhystrixのヤマアラシとマスタークラスを持っている必要があります
<!-- hystrix -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<!-- actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
また!
springcloudアップグレードピット--- SerlvetRegistrationBeanため、デフォルトパスspringboot以下の構成サーブレットクラスのマスターブートを見ていない「/hystrix.stream」必要がプロジェクトを監視しているため
@Bean
public ServletRegistrationBean getServlet()
{
HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
registrationBean.setLoadOnStartup(1);
registrationBean.addUrlMappings("/hystrix.stream");
registrationBean.setName("HystrixMetricsStreamServlet");
return registrationBean;
}
説明図
サービス要求の周波数に対する要求の頻度
パーセンタイル遅延統計は、直前パーセンタイルの統計を遅らせます