My var contains host:port type value, ie localhost:9200
Got this error ERROR logstash.agent - Cannot load an invalid configuration {:reason=>"bad URI(is not URI?):
I don't think the hosts option is subject to such expansions. Supporting event-dependent %{fieldname} expansions would be a bad idea, and since they go along with ${envname} expansions you don't get the latter either.
Could you please elaborate why hosts option is not subject to such expansions ?
Because %{fieldname} expansions in hosts could mean that Logstash would have to connect to a different host for every event. There are probably ways to solve that in a reasonable way but I suspect nobody has wanted to spend the time doing that.
Since we could do so in 2.x logstash version
Oh? That's surprising.
and in other ouptut plugins like Kafka in logstash 5.3 ?
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.