Eureka を介して実行中のサービスを検出できるタービンの実装があります。
2015-09-08 11:40:13.727 INFO 13112 --- [ Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery : Fetching instance list for apps: [policy-service]
2015-09-08 11:40:13.727 INFO 13112 --- [ Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery : Fetching instances for app: policy-service
2015-09-08 11:40:13.727 INFO 13112 --- [ Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery : Received instance list for app: policy-service, size=1
2015-09-08 11:40:13.727 INFO 13112 --- [ Timer-0] c.n.t.discovery.InstanceObservable : Retrieved hosts from InstanceDiscovery: 1
2015-09-08 11:40:13.728 INFO 13112 --- [ Timer-0] c.n.t.discovery.InstanceObservable : Found hosts that have been previously terminated: 0
2015-09-08 11:40:13.728 INFO 13112 --- [ Timer-0] c.n.t.discovery.InstanceObservable : Hosts up:1, hosts down: 0
Hystrix は、クライアント アプリ ポリシー サービスで実行されています。そのストリームを表示して、hystrix ダッシュボードで確認できます。
問題は、Turbine ストリームを表示すると、次のようになることです。
: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1441734488823}
URI を使用して Hystrix ダッシュボードで表示すると、http://localhost:8095/turbine.stream?cluster=DEV
「読み込み中...」と表示されます。
この投稿に記載されているすべてのことを試しましたが、役に立ちませんでした。
これが私のタービン サービスの application.yml です。
turbine:
aggregator:
clusterNameExpression: new String("default")
clusterConfig: DEV
#http://localhost:8095/turbine.stream?cluster=DEV
appConfig: policy-service
InstanceMonitor:
eventStream:
skipLineLogic:
enabled: false
clusterConfig と clusterNameExpression なしでこれを試しました。
ここに私のbootstrap.ymlがあります:
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
spring:
application:
name: turbine-service
server:
port: 8095
そして、ここに私の情報源があります:
package com.ml.turbine;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.turbine.EnableTurbine;
@SpringBootApplication
@EnableTurbine
@EnableEurekaClient
public class TurbineService {
public static void main(String[] args) {
SpringApplication.run(TurbineService.class, args);
}
}
ブラウザでタービン ストリームにアクセスすると、ログに次のように表示されます。
2015-09-08 14:03:19.967 INFO 12024 --- [nio-8095-exec-4] c.n.t.s.servlet.TurbineStreamServlet : FilterCriteria: []
2015-09-08 14:03:19.967 INFO 12024 --- [nio-8095-exec-4] c.n.t.s.servlet.TurbineStreamServlet : StatsType filters: []
2015-09-08 14:03:19.967 INFO 12024 --- [nio-8095-exec-4] c.n.t.s.TurbineStreamingConnection : Relevance config: []
2015-09-08 14:03:19.967 INFO 12024 --- [nio-8095-exec-4] c.n.t.s.TurbineStreamingConnection : Relevance metrics config: {}
2015-09-08 14:03:19.967 INFO 12024 --- [nio-8095-exec-4] c.n.t.monitor.cluster.ClusterMonitor : Registering event handler for cluster monitor: StreamingHandler_92386c8c-b263-4548-be07-10c1a2a3dc27
2015-09-08 14:03:19.967 INFO 12024 --- [nio-8095-exec-4] c.n.t.handler.TurbineDataDispatcher :
Just added and starting handler tuple: StreamingHandler_92386c8c-b263-4548-be07-10c1a2a3dc27
2015-09-08 14:03:19.968 INFO 12024 --- [nio-8095-exec-4] c.n.turbine.data.AggDataFromCluster : Per handler dispacher started for: StreamingHandler_92386c8c-b263-4548-be07-10c1a2a3dc27
2015-09-08 14:03:19.973 INFO 12024 --- [nio-8095-exec-4] c.n.t.monitor.cluster.ClusterMonitor : All event handlers for cluster monitor: [StreamingHandler_92386c8c-b263-4548-be07-10c1a2a3dc27, StreamingHandler_deaba37e-b712-49db-beba-ab9f60848118, StaticListener_For_Aggregator, StreamingHandler_42896dd8-5d90-43c2-89ad-f57151b94894]
2015-09-08 14:03:19.974 INFO 12024 --- [nio-8095-exec-4] c.n.t.monitor.cluster.ClusterMonitor : Starting up the cluster monitor for DEV_agg
タービン ストリームがポリシー サービスに接続されていて、hystrix ストリームが正常に動作しているのに、タービン ストリームに何も表示されないのはなぜですか?