Logstash JDBC Connection string multiple entries in Environment variable

I want to add multiple entries in my environment variable and then pass them into my logstash jdbc connection string. When I do that it reads all the values in my variable at once and then fails with my connection attempt - is there a way around this?

The intention is to have this logstash input section run across multiple servers and the environment variable be dynamically read in. I have about 300+ servers which I need to run this against thus it is vital to have the servername in my connection string populated with a list.

Example below:
This is how I set my variable, this works fine if I only have one server in the list:

export ENV_NAME="servername1,servername2"

Config file (not sure why my Dollar signs are being removed):

"jdbc:sqlserver://${ENV_NAME};user=secretuser;password=${ES_PWD}"

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