Using environmnet variables for kafka output

Following configuration is not working.

output.kafka:
  enabled: true
  **hosts: ["${KAFKA_HOST_1}", "${KAFKA_HOST_2}", "${KAFKA_HOST_3}"]**
  topic: ${KAFKA_TOPIC_NAME}

///
Environment variables set as

export KAFKA_HOST_1="host1.xxxxx.com:9092"
export KAFKA_HOST_2="host2.xxxxx.com:9092"
export KAFKA_HOST_3="host3.xxxxx.com:9092"

///

How do you start the beat? Which version of filebeat are you using?

Is the same user running the beat as where you have set the env variables?

In you post above you have ``**` stars before and after the config, I assume that is for bold and not in the config itself?

Note: I reformatted your post above to make the config more readable.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.