當使用Turbine 來監控整個系統和集羣的時候,會出現長時間loading的情況,無法正常使用,以前舊版本的解決方式無法正常解決,我將從頭到尾整合並達到可使用!
環境:
spring boot:2.1.5
spring cloud:Greenwich.SR1
1.需要引入以下jar:
2.需要在application開啓註解服務:
因爲監控的服務不光要開啓熔斷和儀表盤,同樣也要開啓turbine
3.YML配置
4.在需要監控的服務下配置bean
我嘗試了了很多遍,發現單獨的設置yml是不起作用的
並且也能解決以下異常:
com.netflix.turbine.monitor.instance.InstanceMonitor$MisconfiguredHostException: [{"timestamp":"2018-08-07T03:36:31.487+0000","status":404,"error":"Not Found","message":"No message available","path":"/actuator/hystrix.stream"}]