2017-04-03 2 views
1

저는 Spring Boot, Fabric8의 Spring-Cloug-Kubernetes를 사용하여 Kubernetes에 microservices를 배포하고 있습니다. 이제는 Fabric8 Kubeflix에 의해 제공되는 Hystrix 대시 보드가 필요합니다.Hystrix 대시 보드가 Kubernetes의 Kubeflix와 작동하지 않습니다.

내 배포에 레이블을 설정 한 :

그리고 너무 내 포드에 : 터빈 서버 포드 로그에

metadata : 
    labels: 
     hystrix.cluster: default 
     hystrix.enabled: true 

내가 가진 :

2017-03-31T15:23:10.514696068Z 2017-03-31 15:23:10.514 INFO [turbine-server,,,] 1 --- [  Timer-0] c.n.t.discovery.InstanceObservable  : Found hosts that have been previously terminated: 0 
2017-03-31T15:23:10.514700568Z 2017-03-31 15:23:10.514 INFO [turbine-server,,,] 1 --- [  Timer-0] c.n.t.discovery.InstanceObservable  : Hosts up:0, hosts down: 0 

및 해당/discovery 끝 점이 표시됩니다.

Hystrix Endpoints: 

터빈 서버 application.yml : 내 microservices에

spring: 
    application: 
    name: turbine-server 
turbine: 
    instanceUrlSuffix: :80/hystrix.stream 
    aggregator: 
    clusterConfig: default 
InstanceDiscovery: 
    impl: io.fabric8.kubeflix.turbine.TurbineDiscovery 

난 그냥 그들의 주요 응용 프로그램 클래스의

@EnableCircuitBreaker 
@EnableHystrix 

있습니다. 내가 포드의 포트 (80)를 노출는 Kubernetes 서비스를 가지고 있기 때문에

나는 터빈 접미사로 포트 80을 설정

spec: 
    ports: [ 
     name: default 
     protocol: TCP, 
     port: 80, 
     targetPort: 8080, 
     nodePort: 32193 
    ], 
    clusterIP: 10.0.72.62, 
    type: NodePort 

내 서비스에/건강을 수행 할 때 :

"status": "UP", 
"hystrix": { 
    "status": "UP" 
}, 

그리고/hystrix . 스트림 :

data: {"type":"HystrixCommand","name":"getLabel","group":"LabelController","currentTime":1491222462325,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":0,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":0,"rollingCountFailure":0,"rollingCountFallbackEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackMissing":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":0,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":0,"rollingCountSuccess":0,"rollingCountThreadPoolRejected":0,"rollingCountTimeout":0,"currentConcurrentExecutionCount":0,"rollingMaxConcurrentExecutionCount":0,"latencyExecute_mean":0,"latencyExecute":{"0":0,"25":0,"50":0,"75":0,"90":0,"95":0,"99":0,"99.5":0,"100":0},"latencyTotal_mean":0,"latencyTotal":{"0":0,"25":0,"50":0,"75":0,"90":0,"95":0,"99":0,"99.5":0,"100":0},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":5000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"THREAD","propertyValue_executionIsolationThreadTimeoutInMilliseconds":1000,"propertyValue_executionTimeoutInMilliseconds":1000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1,"threadPool":"LabelController"} 
data: {"type":"HystrixThreadPool","name":"LabelController","currentTime":1491222462325,"currentActiveCount":0,"currentCompletedTaskCount":2,"currentCorePoolSize":10,"currentLargestPoolSize":2,"currentMaximumPoolSize":10,"currentPoolSize":2,"currentQueueSize":0,"currentTaskCount":2,"rollingCountThreadsExecuted":0,"rollingMaxActiveThreads":0,"rollingCountCommandRejections":0,"propertyValue_queueSizeRejectionThreshold":5,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"reportingHosts":1} 

hystrix- 대시 보드는 다음 turbine.stream을 수신합니다.

{"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1491222578286} 

버전 :

Spring Boot : 1.4.1.RELEASE 
io.fabric8.kubernetes-client : 1.4.14 
io.fabric8.kuberflix.turbine-discovery : 1.0.28 
Spring cloud Neflix : 1.2.4.RELEASE 
Netflix hystrix : 1.5.6 

내 터빈 서버에 문제가 있나요? 내 마이크로 서비스에서 hystrix.stream을 감지하지 못하는 이유는 무엇입니까? 는 Kubernetes 하나가 사용되도록

ribbon.eureka.enabled: false 
eureka.client.enabled: false 

:

답변

1

좋아 내가 기본 유레카 검색을 해제했다, 작동합니다.

그리고 instanceUrlSuffix는 여전히 8080/hystrix.stream이어야합니다. 포드의 내부 k8 IP를 사용하기 때문에.

+0

및 서비스에 히스테릭스 레이블도 설정하십시오! 배포 및 포드뿐 아니라 (서비스에서만 테스트 할 수 있음) –

+0

서비스에서 히스테릭스 레이블을 설정하는 것만으로는 충분하지 않지만 필요합니다. 포드/배치에 레이블을 설정하면 작동하지 않습니다. 그리고 이것은 불행한 일입니다. 터빈을 사용하여 메트릭을 수집하려면 서비스를 정의해야합니다. – emas

관련 문제