yet, getting following message through Logstash' logs:
[2019-01-23T16:31:56,508][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:X, :exception=>"Java::JavaNet::URISyntaxException", :message=>"Illegal character in path at index 0: ["esi1","esi2"]",...
however, if I use single host instead of multiple (array), everything works as expected:
I think this is working as expected. The configuration parser does not convert a string that looks like an array into an array when it does variable substitution. So the plugin thinks it has a single URI, not an array of URIs.
It only works as expected if I use single host (defined via string) instead of multiple hosts (defined via array), I'm trying to get to multiple hosts instead of using single host.
Yes, I understand what you are trying to do. The code that processes hosts expects to receive either a string containing a single host, or an array containing mulitple hosts. When you do that variable substitution it gets passed a string containing multiple hosts, and that does not work.
while this may work, it is more of workaround rather then a solution... as this has hard coded number of hosts and the whole idea of using environment variables is so it can be easily adjusted if needed and in your case if additional host is added, one would have to change environment variable AND pipeline...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.