From 3dde6104a46632922e9cd1087e5b8e247e3e7c8c Mon Sep 17 00:00:00 2001 From: hokiegeek2 Date: Fri, 14 Jul 2017 14:10:00 -0400 Subject: [PATCH] Kafka connectString generation with brokerHost variable --- check/setup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check/setup.go b/check/setup.go index b5f40fd..3f26ce7 100644 --- a/check/setup.go +++ b/check/setup.go @@ -31,7 +31,7 @@ func (check *HealthCheck) connect(firstConnection bool, stop <-chan struct{}) er func (check *HealthCheck) tryConnectOnce(createBrokerTopic, createReplicationTopic *bool) error { pauseTime := check.config.retryInterval // connect to kafka cluster - connectString := []string{fmt.Sprintf("localhost:%d", check.config.brokerPort)} + connectString := []string{fmt.Sprintf("%s:%d", check.config.brokerHost, check.config.brokerPort)} err := check.broker.Dial(connectString, check.brokerConfig()) if err != nil { log.Printf("unable to connect to broker, retrying in %s (%s)", pauseTime.String(), err)