linkedin / Burrow

Kafka Consumer Lag Checking
Apache License 2.0
3.75k stars 798 forks source link

Specify server list in environment variable #650

Open shoan opened 4 years ago

shoan commented 4 years ago

I am attempting to override the server list by the environment variable. I have attempted to set the environment value as ['host1:port','host2:port','host3:port']. I have also tried variations of this by replacing comma with space, single quotes with double etc. Every time I get panic: Cluster 'kf_server' has one or more improperly formatted servers (must be host:port).

What is the right way to specify a server list in the environment for burrow?

nightmareartist commented 4 years ago

In case you haven't cracked this, Burrow uses Viper which in turn uses string.Fields to bind an ENVVAR to golang slice field. This means that you need to set your ENV vars in this way: VARIABLE='server1:port server2:port. Just put a space between your servers, no quotes except before and after server list.